Chapter 10 Chapter 10 Introduction to Introduction to Inference Inference Will Freeman Will Freeman
Mar 26, 2015
Chapter 10Chapter 10Introduction to InferenceIntroduction to Inference
Will FreemanWill Freeman
10.1: Estimating with Confidence10.1: Estimating with Confidence
Statistical confidence: a confidence Statistical confidence: a confidence interval is a range that the unknown interval is a range that the unknown mean will fall within for a certain % mean will fall within for a certain % of samples. (confidence level)of samples. (confidence level)
The confidence level is the The confidence level is the probability that our method will give probability that our method will give a correct answera correct answer
10.110.1
A 90% confidence level includes 90% A 90% confidence level includes 90% of the normal sampling distribution of of the normal sampling distribution of the mean of our samplethe mean of our sample
Big CandyBig Candy
10.110.1
To calculate a confidence interval, To calculate a confidence interval, look up the z-score (z*) from table C. look up the z-score (z*) from table C. multiply this by the standard multiply this by the standard deviation of the sampling deviation of the sampling distribution. The mean plus or minus distribution. The mean plus or minus this value is the confidence intervalthis value is the confidence interval
10.110.1
Margin of error:Margin of error:• The decrease the margin of error 1 of 3 The decrease the margin of error 1 of 3
things must happenthings must happen Decrease the confidence levelDecrease the confidence level The standard deviation of the data The standard deviation of the data
decreasesdecreases Use a larger sampleUse a larger sample
These methods will also increase the These methods will also increase the power of a test (we’ll get to this power of a test (we’ll get to this later)later)
10.110.1
Choosing a sample sizeChoosing a sample size• If you wish to have a certain level of If you wish to have a certain level of
confidence and a certain margin of confidence and a certain margin of error, you must figure out how large of a error, you must figure out how large of a sample to usesample to use
• Where m is the margin of errorWhere m is the margin of error• If you get a decimal ALWAYS round up. If you get a decimal ALWAYS round up.
Even if you get 34.00001Even if you get 34.00001
10.110.1
Cautions:Cautions:• The sample you use The sample you use mustmust be normal. If be normal. If
there are outliers or skewness, none of there are outliers or skewness, none of this stuff works. Be careful that the this stuff works. Be careful that the sample is large enough and is normalsample is large enough and is normal
• The sample must be an SRSThe sample must be an SRS• You must know the standard deviation You must know the standard deviation
of the population (usually unrealistic)of the population (usually unrealistic)• The population does not have to be The population does not have to be
normalnormal
10.2: Tests of Significance10.2: Tests of Significance
Significance tests help us determine Significance tests help us determine the validity of claims. For example, if the validity of claims. For example, if somebody claims to make 80% of somebody claims to make 80% of free throws we can take a sample of free throws we can take a sample of them shooting free throws and them shooting free throws and determine how likely it is that their determine how likely it is that their 80% claim is true80% claim is true
10.210.2
To make this test we need a To make this test we need a null null hypothesishypothesis. The null hypothesis assumes . The null hypothesis assumes that the claim is true; so for our example that the claim is true; so for our example the null hypothesis would be free throws the null hypothesis would be free throws made = 80%made = 80%
The alternative hypothesis is the The alternative hypothesis is the hypothesis that the null hypothesis is not hypothesis that the null hypothesis is not true. It could be either free throws made = true. It could be either free throws made = 80%, <80% or >80%80%, <80% or >80%
10.210.2
Say the alternative hypothesis is free Say the alternative hypothesis is free throws made < 80%. If we take a throws made < 80%. If we take a sample and find that the person sample and find that the person made 12 of 20. We unrealistically made 12 of 20. We unrealistically know that the standard deviation is 5know that the standard deviation is 5
Big CandyBig Candy
10.210.2 The magnitude of the z-score of -3.577 is The magnitude of the z-score of -3.577 is
much larger than the z-score of 1.645 for a much larger than the z-score of 1.645 for a .05 significance level, so we can reject the .05 significance level, so we can reject the null hypothesis. The other way to know is null hypothesis. The other way to know is to use a z-test on the calc. enter the to use a z-test on the calc. enter the population standard deviation, n, H naught population standard deviation, n, H naught and the sample mean. Then select the and the sample mean. Then select the correct alternative hypothesis and push correct alternative hypothesis and push enter. If the p-value it gives you enter. If the p-value it gives you (probability that this sample mean was (probability that this sample mean was obtained purely by chance) is less than the obtained purely by chance) is less than the significance level you chose, then the null significance level you chose, then the null hypothesis can be rejected. For our hypothesis can be rejected. For our example the p-value is .000173, which is example the p-value is .000173, which is much less than .05much less than .05
10.210.2
Be careful to pay attention to Be careful to pay attention to whether you are using a one sided or whether you are using a one sided or two sided test. For a 2-sided use the two sided test. For a 2-sided use the confidence level at the bottom of the confidence level at the bottom of the chart, for 1-sided use the decimal at chart, for 1-sided use the decimal at the top of the chart. the top of the chart.
Time for a break…Time for a break…
This probably hasn’t made much This probably hasn’t made much sense so far. Hopefully it has… we’re sense so far. Hopefully it has… we’re only halfway thereonly halfway there
Even more breakEven more break
Big candy helps the mind make Big candy helps the mind make sense of all these wordssense of all these words
10.3: Making sense of all this10.3: Making sense of all this
You have to remember what stat is for: You have to remember what stat is for: real-life use. Sometimes something that real-life use. Sometimes something that has statistical significance has no practical has statistical significance has no practical significance. You always have to factor in significance. You always have to factor in what the costs are of proving your data. If what the costs are of proving your data. If the null hypothesis is false, could you lose the null hypothesis is false, could you lose money? Are people so sure of the null money? Are people so sure of the null hypothesis that you need a very high hypothesis that you need a very high confidence level to convince them it is confidence level to convince them it is wrong?wrong?
10.310.3
For example, you have a null For example, you have a null hypothesis that it takes 100 days for hypothesis that it takes 100 days for a broken bone to heal. With a new a broken bone to heal. With a new miracle treatment you find with 95% miracle treatment you find with 95% certainty that bones heal in 98 days. certainty that bones heal in 98 days. This treatment costs $17,324. the This treatment costs $17,324. the results may be statistically results may be statistically significant, but in reality 2 days isn’t significant, but in reality 2 days isn’t worth that much money. So who worth that much money. So who really cares.really cares.
Big CandyBig Candy
10.310.3
Be careful that you are using a valid, Be careful that you are using a valid, normal sample when using the normal sample when using the inference toolbox (p. 571). Otherwise inference toolbox (p. 571). Otherwise all this time you just wasted means all this time you just wasted means nothingnothing
10.4: Inference as Decision10.4: Inference as Decision There are two ways we can screw up. The first is There are two ways we can screw up. The first is
that we reject the null hypothesis when it is that we reject the null hypothesis when it is actually true, and the second is that we accept actually true, and the second is that we accept the null hypothesis when it is actually false. Here the null hypothesis when it is actually false. Here is a very artistic diagram to illustrate this is a very artistic diagram to illustrate this exceedingly complicated conceptexceedingly complicated concept
10.4. I don’t know what I’m talking 10.4. I don’t know what I’m talking aboutabout
The probability that you get a type I The probability that you get a type I error is just the significance level. error is just the significance level. That part is pretty easy. Type II is the That part is pretty easy. Type II is the part that is mildly perplexingpart that is mildly perplexing
10.410.4
There are a couple of steps for There are a couple of steps for finding the probability of a type II finding the probability of a type II error:error:
1)1) Calculate confidence intervalCalculate confidence interval
2)2) Calculate Type II error using Calculate Type II error using alternative mean valuealternative mean value
Big CandyBig Candy
10.410.4
The answer is the probability of a The answer is the probability of a type II error. 1-(p of Type II error) is type II error. 1-(p of Type II error) is the power of the test. Anything the power of the test. Anything above 80% is good. above 80% is good.
HelpHelp
I’m confused. This may have made I’m confused. This may have made sense, but possibly not. So have fun.sense, but possibly not. So have fun.
Big CandyBig Candy