### Create a StudySoup account

#### Be part of our community, it's free to join!

Already have a StudySoup account? Login here

# Intro To Stats Analysis Disc ECON 3710

UVA

GPA 3.91

### View Full Document

## 41

## 0

## Popular in Course

## Popular in Economcs

This 90 page Class Notes was uploaded by Nola Williamson on Monday September 21, 2015. The Class Notes belongs to ECON 3710 at University of Virginia taught by Ronald Michener in Fall. Since its upload, it has received 41 views. For similar materials see /class/209765/econ-3710-university-of-virginia in Economcs at University of Virginia.

## Reviews for Intro To Stats Analysis Disc

### What is Karma?

#### Karma is the currency of StudySoup.

#### You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 09/21/15

Hypothesis Testing Testing vs Estimation 39 Con dence Intervals are used to estimate an unknown population parameter using sample data 39 A Hypothesis test is used when theory suggests a particular value for an unknown population parameter The question then becomes whether the sample data is consistent with the theory or not A Theory about the value of a population parameter a One popular test of ESP uses What is called a Rhine deck which consists of cards with ve different images on them a The cards are put in random order and the subject must guess the card that has been drawn Without seeing it The Rhine Deck and ESP 39 The population parameter you are investigating is the proportion of correct answers in an in nitely long sequence of guesses 39 The sample statistic is the sample proportion of correct answers in a xed number of guesses The Theory 39 There is one obvious theory here Nothing is going on and the person is just guessing By guessing the person should get 20 correct This is the value of the population parameter we Wish to test 39 Given sample data such as 25 correct in 100 trials the question becomes Is this sample evidence enough to disprove the theory that the person is just guessing The Null Hypothesis The theoretical value of the unknown population parameter we wish to test is called the null hypothesis H0 19 2 Po 39 H0 is the universal notation for In this applicatiOH a null hypothesis H 0 p 20 Often the null corresponds to the idea nothing interesting or unexpected is going on The Alternative Hypothesis The alternative hypothesis comes in three avors I Less than Not equal to twosided H A p lt 190 I Greater than HsubA signi es the alternative hypothesis HA p i p0 Which avor is a matter of judgment What do you expect to H A p gt 190 be true if the null is false ESP and the Alternative Hypothesis 9 If you believe that ESP if it o exists will manifest itself in the H0 p 3920 person getting more than 20 H A p gt 20 correct you d do a greater than test This leaves the possibility p lt 20 H O p g 20 hanging so generally it is tossed into the null hypothesis HA 17 gt 3920 Be careful about your notation Correct Incorrect 19041212 H012 H0p20 H01920 How27 H0s27 39 Null and alternate hypotheses are always about unknown population parameters they are never about sample statistics Isn t this nitpicking Confusing sample statistics and population parameters leads to complete nonsense The statement is a perfect example Before the sample is drawn a sample statistic is a random variable and therefore can t be equal H 0 X Z to a constant After the sample is drawn the sample mean is just a number No fancy statistical theory is required to compare two known numbers Another Hypothesis Test Mendel s Carnations One of Mendel s experiments involved crossing pink carnations These pink carnations produce red White and pink offspring Mendel believed each pink carnation had one red gene and one white gene and that the pink offspring got one of each Gene taken from the other parent 9 R W g R RR RW W WR WW The Hypothesis 39 Mendel further believed that each of the four outcomes was equally likely so that in an in nitely long trial a quarter of the offspring should be red a quarter White and half pink 39 So for example the population proportion of pink offspring is predicted to be p 50 39 Suppose that among 100 offspring 56 are pink Is this consistent with Mendel s theory or does it refute the theory The Alternative Hypothesis Suppose we test a hypothesis about the proportion of pink carnations Our null is that the proportion is onehalf H0 a If the null is false do we expect p bigger than 5 smaller than 5 or HA p i o 5 0 could either be plausible Both are plausible so a Not Equals or twosided test is appropriate A Lessthan test Advertising claims are sometimes taken as the basis for a null hypothesis Suppose Duracell says their batteries will power a ashlight for at least 4 H 0 39 u 2 4 hours a If we wish to test this claim by testing a HA 39 u lt 4 random sample of their batteries these would be the null and alternative hypotheses Mu is pop mean lifetime How do we know we have the correct alternative 39 In homework and exams the kind of test is usually signaled with key words test to see if psychics do better than pure guessers would signal a GT test s The words different from signal a two sided or NH test For example Test to see if the population proportion is di erentfmm one half Selecting the alternative hypothesis 39 A question such as Does the statistical evidence suggest Duracell s advertised claim is incorrect and their batteries are in fact less durable is signaling a lessthan test a In realworld applications deciding on the alternative is sometimes dif cult ambiguous cases ought to be treated as twosided Picking the alternative a problem even in ction In the movie Man on a Swing Cliff Dam Robertson plays a small town sheriff A woman is brutally murdered and he has no suspects 39 Joel Grey appears says he is psychic and offers to help he then describes details of the crime scene only a true psychic or the true killer would know As the movie poster says 39 Psychic 39 Occultist 39 Murderer 39 Which We discover Joel Grey is creepy Grey knows he is the prime suspect and enjoys it Grey s smug satisfaction suggests he is getting away with murder Robertson desperately wants to nail Grey for the killing but lacks evidence 39 Voila In comes a statistics professor who arrives with a Rhine deck to test Grey Cliff Robertson who arranged the test paces nervously outside the door fingering his handcuffs The professor emerges o I have good news and bad news he says 39 Give me the good news Robertson replies 39 He didn t do as well as the law of odds says the professor Robertson pulls out his handcuffs The bad news is 39 he did much worse than can be eXplained by Chance Huh 39 Robertson wheels to face the professor What does it mean he snarls O Beats me the professor replies that s your problem The strange thing is 39 Parapsychologists have done tests of this kind for many decades now and believe they have documented cases where the outcome is too far from random to be explained by chance 39 But psychics sometimes perform worse than random guessers so that professional parapsychologists now do two sided tests Accepting and Rejecting 39 In a hypothesis test after examining the sample data you make a choice Either you accept the null hypothesis or You reject the null hypothesis in favor of the alternative 39 Accepting the null hypothesis means you found no evidence contradicting it it does not prove that the null is true A useful analogy 39 A hypothesis test is like a jury trial In a jury trial the null hypothesis is innocence Innocent until proven guilty Only if the evidence proves guilt beyond a reasonable doubt do you reject the null and nd the defendant guilty Acquittal accepting the null is no guarantee of innocence it means insuf cient evidence to convict Example The O J Simpson case The jury acquitted based on doubts about the evidence not because they were convinced O J was innocent This is Why I 39 Some authors dislike the phrase accept the null hypothesis it implies the null has been shown to be true 39 They prefer to say fail to reject the null instead 39 However since almost everyone uses the phrase accept the null so will I Two Kinds of Errors 39 When you accept or reject a Null there are two distinct kinds of errors that can be Truth made Null True Null False Rejecting a true null or Accept 0k Type 11 Type I error 3 nu Accepting a false null E t Type 1 0k or Type 11 error How likely are these errors 39 The probability of a Type I error is called oc 39 The probability of a Type 11 error is called 3 39 These are really conditional probabilities Alpha is the probability of rej ecting the null given that it is true Beta is the probability of accepting the null given that it is false plus a particular false value The ESP example I am going to treat this as a greater than test despite the objections of parapsychology 39 Suppose we propose to test 0 3 p g with a trial of 100 cards 39 And we propose to reject the H A I p gt null and proclaim the subject psychic if they get 30 or more correct What are the properties of the test 39 We can easily evaluate the chance of committing a type I error using this rule a prob x 2 30 39 It is the chance a person 100 100 x 10 just guessing succeeds in Z x 3920 3980 getting 30 or more correct Binomial n100 p 20 Here is the picture for the normal approximation Distribution of sample proportion if the null is true 10 Normal Density 01 I Accept Reject And the corresponding computation of alpha X is a probability given that the null is true Ef9 p 20 a The null says p20 p1 p 2X 8 a 04 Therefore we use p20 P n 100 in all the probability Z 2 300 200 2 25 calculations 3904 Ans 0 Z 0062 Prob zgt250062 How about Type 11 error Type 11 error occurs when the person is genuinely psychic and we fail to detect it a How likely this is depends on how talented the psychic is a psychic who never makes a mistake would be easily detected 39 Power is the chance a false null is correctly rejected It is equal to 13 39 Consider some speci c examples psychics who get 25 correct and psychics who get 35 correct What is B When p 25 39 We can easily evaluate the chance of committing a type 11 error using this rule pr0bx lt 30 39 It is the chance a person 29 100 x 10h capable of getting 25 Z x 3925 3975 correct gets fewer than 30 correct in 100 tries Binomial n100 p 25 Here is the picture of 3 for p 25 Distribution of Sample Proportion Psychic who gets 25 Correct x Normal Density O k 0 J 01 D l I 0 O 015 020 025 030 035 Accept Reject Here is the Power of the test for p 25 Distribution of Sample Proportion Psychic who gets 25 Correct Normal Density in I I I I l I I I I I I 015 020 025 030 035 Accept Reject And the corresponding computation of B 3 is a probability given that the null is false Here the null is false Epp 23925 and p 1s actually 25 a PU P l25x75 20433 Therefore we use 300 5 100 p25 in all our 39 04 caICUIa OHS 8 Prob z lt 115 8749 9 Ansz 8749 power is 13 1251 2115 What is B When p35 39 We can easily evaluate the chance of committing a type 11 error using this rule pr0bx lt 30 39 It is the chance a person 29 100 x 10h capable of getting 35 Z x jws 3965 correct gets fewer than 30 correct in 100 tries Binomial n100 p 35 Here is the picture of 3 for p 35 Distribution of Sample Proportion Psychic who gets 35 Correct Normal Density O I 0 A 01 O l I 0 u u l I I u I u I 025 030 035 040 045 Accept Reject Here is the Power of the test When p 35 Distribution of Sample Proportion Psychic who gets 35 Correct Normal Density Accept Reject And the corresponding computation of B 3 is a probability given that the null is false E03 p 35 o Here the null is false p1p 35x65 and p 1s actually 35 p T W 0477 Therefore we use Neglecting ccf p35 in all our Z 30 35 2 105 calculations 0477 39 39 Ansz 1469 power 8Probzlt l05l469 is 13 8531 Repeat for many values of H A 39 Then plot the power of the test as a function of the true value of psychic ability 39 This plot of power versus alternative values is called a power curve 39 The power curve and X together tell you how well the test performs Probability of Detecting 10 09 08 07 06 05 04 03 02 01 00 The Power Curve The Power Curve for this Test 02 03 True Psychic Ability 04 In an ideal world 39 Investigators would consider many factors in designing a test Any prior knowledge regarding the plausibility of the null hypothesis The relative cost of Type I and Type II errors The costs and bene ts of getting a bigger sample They would then pick a sample size and rejection region that produced an acceptable 0 and power curve in light of these considerations But What many really do is 39 Set X at a conventional level typically 5 39 Select the rejection region to achieve the desired level for X 39 Completely ignoring Type 11 Error and Power CostsBene ts Prior Knowledge Why 39 There is no good reason it is a sociological phenomenon Doing tests with O05 has been standard practice for many decades many practitioners now regard it as a hallmark of proper scienti c procedure a When RA Fisher a famous statistician popularized hypothesis tests he was asked what would be an appropriate 0 He opined that 5 seemed to him to be about right this was the origin of the practice If we want O05 in the ESP example here is the picture Distribution of sample proportion if the null is true Normal Density Reject Z Accept How do we nd the boundary of the rejection region 39 The boundary value p barstar can be found from the followin gtxlt g z 1645 p 3920 equatlon 05 2 X 8 Therefore our test is If 100 the psychic gets mOl e 13 20 1645 x 04 2658 than 2658 right in 100 trials reject H0 If our sample outcome were 28 II 39 Our decision rule is If the sample proportion is less than or equal to 266 accept HO If the sample proportion is greater than 266 reject H0 39 Since 28 gt 266 it is in the rejection region and we reject HO Normal Density Here is the picture Distribution of sample proportion if the null is true 01 02 28 03 lt gt Accept 26 6 Reject More Terminology 39 If you test a null hypothesis using a rejection rule designed to give X 05 and you reject the null the result is said to be statistically signi cant at the 5 level 39 If you test a null hypothesis using a rejection rule designed to give X 01 and you reject the null the result is said to be statistically signi cant at the 1 level And so on i What statistically signi cant means and doesn t mean 39 If a result is statistically signi cant What it means is that you believe you have enough sample data to discern a difference between the null and the truth a The difference you discern may or may not be of any practical importance statistical signi cance shouldn t be confused with practical signi cance There are other ways to do a hypothesis test 39 The method most often used in Anderson Sweeny and Williams involves comparing a critical value of z to a computed value 39 This amounts to nothing more than relabeling the X aXis in our diagram Look at the picture in terms of z Distribution of sample proportion if the null is true Normal Density Compute the z that corresponds to our observed value Again suppose our subject got 28 correct in 100 trials The zscore is 200 Which is greater than the critical zscore of 1645 28 20 Obs 2gtlt8 100 zobs 200 gt 1645 205 39 So we reject the null hypothesis Normal Density Here is the picture Distribution of sample proportion if the null is true l 2f 03 I 3 L r 0 2 Accept L645 Reject PValues 39 Another way to test a hypothesis is by using What are known as pValues 39 If X gt pValue reject HO if X lt pValue accept HO 39 For a greaterthan test the pvalue is the probability of getting an outcome as big or bigger than what you got in your sample when the null hypothesis is true A Comparison of tail areas Distribution of sample proportion correct Right tail area Normal Density 024 025 026 027 028 029 030 031 032 Accept Rej ect Computing the pValue The chance of getting 28 or more correct answers While just guessing is 0228 This is the p Value 39 Since O05 gt 0228 reject H0 p Value Prob 13 2 28 pValue Prob z 2 04 Prob z 2 200 0228 Why are pvalues important 39 It is a superior technique Allows the reader to use Whatever X the reader prefers Communicates the strength of the result better than simply saying statistically signi cant at the 5 level Our pvalue of 0228 for example is statistically signi cant at the 5 level but not the 1 level and would probably not convince a skeptic Practical considerations Many computer programs including Minitab report p values A 2sided test Mendel s carnations 39 Twosided or Not Equal to tests are a bit different Since we have no prior belief that the true 2 value must be above or below the H0 p 3950 null we reject for both very large H i 50 and very small sample outcomes A p 39 Testing whether the proportion of pink offspring is different from p 50 illustrates the technique A TwoSided Test Distribution of Sample Proportion of Pink Carnations when Null Hypothesis is true Normal Density x I 0 A 01 O l I O lt 4 Reject Accept pi U Computing Boundaries of the Rejection Region The test is one where we 1 9 50 accept HO for all Values of 2025 13996 5X5 the sample proport10n 100 between an upper and lower 1 9 50 196X05 z 60 limit z 196 1 93950 39 For O05 these limits are 025 39 5gtlt5 computed to be roughly 40 100 and 60 fa 50 l96gtlt05z40 So our conclusion is 39 If the sample proportion of pink carnations is between 40 and 60 the evidence is consistent with Mendel s theory and we accept the null 39 If the sample proportion is greater than 60 or less than 40 we reject the null 39 So if we got 56 pink carnations to take a speci c example we d accept the null This is the Picture Distribution of Sample Proportion of Pink Carnations when Null Hypothesis is true Normal Density O I 0 A 01 O l I Other ways to do the test I 39 As in the case of Greaterthan tests there are two other ways to perform the test Compare observed zvalues to critical zvalues Compare a p Value to X 39 Let s repeat the test using the zvalue technique Acceptance and Rejection Regions in zvalues Distribution of Sample Proportion of Pink Carnations whenNuHHypmhe sbtme Rescaled to zscores 04 b 03 396 C 8 02 a 39 Z E E 2 2 0 2 01 4 00 4 l 3 1 0 1 lt gt Reject Accept Reject quotZ002 Z002 Computing an observed z Our sample outcome is that 56 of 100 offspring are pink so the observed z is Obs Note we use 50 not 56 in 5X5 computing the standard 100 deviation This is because Zobs 2120 X is a probability given the null is true and the null says p 50 a For X 05 we accept H0 z025 l96 lt 120 lt 196 2025 This is the picture Distribution of Sample Proportion of Pink Carnations when Null Hypothesis is true Rescaled to zscores 04 03 Normal Density O I 025 025 01 i i 00 i i I I I I 3 2 1 0 1A 2 3 lt 120 gt Reject Reject 196 Accept 196 PValues again 39 The other way to test a hypothesis is by using a p value Once again the rule is If X gt pValue reject H0 if O lt pValue accept HO 39 For a twosided test when the sampling distribution is symmetric the pValue is the probability of getting an outcome as far or further from HO as what you got in your sample when the null hypothesis is true A TwoSided pValue Distribution of Sample Proportion of Pink Carnations when Null Hypothesis is true PValue half in each tail Normal Density x I 0 A 01 G l CO O Reject Computing the pValue We compute the pValue and compare it to X 0 Since 2302 gt 05 we accept H0 in this case 0 There is a 23 chance of getting a proportion as far or further from 50 as what we got it is not an unlikely outcome when H0 is true PValuePp g 44o5 2 56 56 50 05 44 50 05 From the z table we nd Pz g 120uz 2 120 2302 z 120 1 120 2 A lessthan test Testing the durability of batteries 39 Our examples so far have tested propositions about population proportions Tests of population H 3 u 2 4 means are also common 0 39 Testing amanufacturer s claim H u lt 4 that its batteries last 4 or more A hours in a particular application is a concrete example 39 Suppose 039 08 and n100 The Lessthan Test Illustrated Normal Density Distribution of the Sample Mean when mu 4 Computing Boundaries of the Rejection Region For a change of pace lets use O02 this time a For this X we accept HO 2 05 Xquot 40 whenever the observed Zoz sample mean is greater than 100 3836 we reject HO when Xquot 40205x083836 the observed sample mean is below 3836 So our conclusion is 39 Suppose our sample yielded a sample mean of395 hours 39 Since 395 gt 3836 we would accept the null hypothesis Normal Density This is the picture Distribution of the Sample Mean when mu 4 370 385 400 415 430 RCJBCt 383 6 Accept Other ways to do the test 39 Once again there are two other ways to perform the test Compare observed zvalues to critical zvalues Compare a p Value to X 39 Let s repeat the test using the zvalue technique The test scaled in zscores Normal Density Distribution of the Sample Mean when mu 4 measured by zscore Reject Accept The zvalue corresponding to our observed sample mean of 395 turns out to be 625 39 Since 205 lt O625 we accept the null hypothesis 20 bs Zo bs Computing the observed z 395 400 8 3905 625 08 Normal Density This is the picture Distribution of the Sample Mean when mu 4 measured by zscore Reject 41625 Accept 205 PValues again 39 The other way to test a hypothesis is by using a p value For all tests greaterthan lessthan and notequal the rule is always the same If X gt pValue reject H0 if O lt pValue accept HO 39 For a lessthan test the pValue is the probability of getting an outcome as small or smaller as what you got in your sample when the null hypothesis is true The pValue illustrated Distribution of the Sample Mean when mu 4 4 PValue Normal Density 370 385 400 415 430 RCJCCt 3823 Accept Computation of the pvalue The pvalue is 266 which means that even if the advertising claim is true p value P lt 395 and battery life averages 4 395 400 hours there is almost a Z T 39625 27 chance of getting a m sample mean battery life as From table or Minitab cdf command 10W as hOllI39S pZ lt 41625 266 a 266 gt 02 so we accept H0 A warning about pValues 39 When doing a greaterthan or lessthan test a p value is not necessarily a tail area a My examples and the book s problems may mislead you into thinking so 39 For a lessthan test the pValue is the chance of getting as result as small or smaller than What you got in your sample When H0 is true 39 Example suppose our sample mean had been 410 instead of 395 This is What the pValue would have been Distribution of the Sample Mean when mu 4 PValue Normal Density 415 430 A 410 Reject 3 823 Accept 370 385 400 When do these situations arise 39 In a onesided test when the sample value of the statistic is on the side predicted by the null hypothesis rather than the side predicted by the alternate hypothesis The large pValue simply tells you the outcome is very likely if the null is true Example the pValue in the last picture is 8944 which says a sample mean of 410 hours is entirely consistent with the null Other Distributions 39 The logic of hypothesis testing can be applied anytime we know how the sample statistic is distributed when the null hypothesis is true 39 Our examples thus far have all been based on the normal distribution but other distributions such as the t frequently arise A tdistribution problem 39 On the average a housewife with a husband and two Children is estimated to work 55 hours or less per week on householdrelated activities The hours worked during a week for a sample of eight housewives are 58 52 64 63 59 62 62 and 55 Test the null that mu is less than or equal to 55 against the alternative it is greater than 55 using O05 Using the t distribution The parameter p is mean hours of housework per week being H 0 I U S 5 5 done by housewives with two children H A 3 u gt 39 We are asked to test this hypothesis using O05 and a sample of eight observations

### BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.

### You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

## Why people love StudySoup

#### "I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"

#### "I used the money I made selling my notes & study guides to pay for spring break in Olympia, Washington...which was Sweet!"

#### "Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."

#### "It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

### Refund Policy

#### STUDYSOUP CANCELLATION POLICY

All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email support@studysoup.com

#### STUDYSOUP REFUND POLICY

StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here: support@studysoup.com

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to support@studysoup.com

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.