Presentation is loading. Please wait.

Presentation is loading. Please wait.

14. Introduction to inference

Similar presentations


Presentation on theme: "14. Introduction to inference"— Presentation transcript:

1 14. Introduction to inference

2 Objectives (PSLS Chapter 14)
Introduction to inference REVIEW: Uncertainty and confidence REVIEW: Confidence intervals REVIEW: Confidence interval for a Normal population mean (σ known) Significance tests Null and alternative hypotheses The P-value Test for a Normal population mean (σ known)

3 Uncertainty and confidence
If you picked different samples from a population, you would probably get different sample means ( x̅ ) and virtually none of them would actually equal the true population mean, .

4 When we take a random sample, we can compute the sample mean and an interval of size plus-or-minus 2σ/√n about the mean. Based on the ~ % rule, we can expect that: Simulation using the applet from Only the sample circled in green did not capture the population mean μ. All the other intervals in this simulation did capture μ. ~95% of all intervals computed with this method capture the parameter μ. Red arrow: Interval of size plus or minus 2σ/√n Blue dot: mean value of a given random sample

5 The margin of error, m A confidence interval (“CI”) can be expressed as: a center ± a margin of error m: m within x̅ ± m an interval: m within (x̅ − m) to (x̅ + m) The confidence level C (in %) represents an area of corresponding size C under the sampling distribution. Note that not all CI are symmetric about the parameter. Some complex methods produce asymmetric intervals. m m

6 Significance tests Someone makes a claim about the unknown value of a population parameter. We check whether or not this claim makes sense in light of the “evidence” gathered (sample data). A test of statistical significance tests a specific hypothesis using sample data to decide on the validity of the hypothesis. You are in charge of quality control and sample randomly 4 packs of cherry tomatoes, each labeled 1/2 lb (227 g). The average weight from the 4 boxes is 222 g. Is the somewhat smaller weight simply due to chance variation? Is it evidence that the packing machine that sorts cherry tomatoes into packs needs revision?

7 Null and alternative hypotheses
The null hypothesis, H0, is a very specific statement about a parameter of the population(s). The alternative hypothesis, Ha, is a more general statement that complements yet is mutually exclusive with the null hypothesis. Weight of cherry tomato packs: H0: µ = 227 g (µ is the average weight of the population of packs) Ha: µ ≠ 227 g (µ is either larger or smaller than as stated in H0) The null and alternative hypotheses are always statements about the population, not statements about samples.

8 Biological and statistical hypotheses
Distinguish between the biological hypotheses and the statistical hypotheses. They should be linked, but are unlikely to be the same. State: What is the practical question, in the context of a real-world setting? Plan: What specific statistical operations does this problem call for? Solve: Make the graphs and carry out the calculations needed for this problem. Conclude: Give your practical conclusion in the real-world setting. The null and alternative hypotheses are always statements about the population, not statements about samples.

9 One-sided vs. two-sided alternatives
A two-tail or two-sided alternative is symmetric: Ha:   µ  [a specific value or another parameter] A one-tail or one-sided alternative is asymmetric and specific: Ha:   µ < [a specific value or another parameter] OR Ha:   µ > [a specific value or another parameter] What determines the choice of a one-sided versus two-sided test is the question we are asking and what we know about the problem before performing the test. If the question or problem is asymmetric, then Ha should be one-sided. Ha should always be two-sided, unless we would never care if the difference is in the opposite direction of the alternative hypotheses. You should never decide on a one-sided or two-sided alternative based on your sample data alone. The sample data will be used to evaluate, or test, the null hypothesis.

10 Is a new drug useful in reducing blood pressure? H0: µ = 0 Ha: µ ≠ 0
Is an herbal remedy manufacturer overstating the concentration of the active ingredient package label (325 mg/tablet)? H0: µ = 325 Ha: µ ≠ 325 Is nicotine content greater than the written 1 mg/cigarette, on average? H0: µ = Ha: µ > 1 Ha: µ = 1 Is a new drug useful in reducing blood pressure? H0: µ = Ha: µ ≠ 0 Notice that the third question does not offer an explicit value for µ. What to write in the null and alternative hypotheses is implied in the question. We ask about a “change” in blood pressure. A “change” is anything not equal to zero. The last question gives more information than is necessary to write the null and alternative hypotheses. The sample results are never used to write the test’s hypotheses.

11 The Probability-value (P-value)
The packaging process is Normal with standard deviation s = 5 g. H0: µ = 227 g versus Ha: µ ≠ 227 g The average weight from your 4 random boxes is 222 g. What is the probability of drawing a random sample such as yours, or even more extreme, if H0 is true? P-value: The probability, if H0 were true, of obtaining a sample statistic as extreme as the one obtained or more extreme. This probability is obtained from the sampling distribution of the statistic.

12 What are the parameters of our working sampling distribution?

13 Interpreting a P-value
Could random variation alone account for the difference between H0 and observations from a random sample? The answer is yes! You must decide if that is a reasonable working explanation.  Small P-values are strong evidence AGAINST H0 and we reject H0. The findings are “statistically significant.”  Large P-values don’t give enough evidence against H0 and we fail to reject H0. Beware: This is not evidence for “proving H0” is true. Think of it this way: When solving a crime, a person with a good alibi will no longer remain a suspect. But a person without an alibi is not necessarily the culprit, just still a suspect. Likewise, we can reject H0 if the sample data contradicts it. But failing to reject H0 does not make it true.

14 Range of P-values P-values are probabilities, so they are always a number between 0 and 1. The order of magnitude of the P-value matters more than its exact numerical value. Possible P-values 1  Not significant  Highly significant Very significant Significant Somewhat significant

15 The significance level α
SN: The use of alpha is an entrenched custom, which is criticized by many statisticians. The significance level, α, is the largest P-value tolerated for rejecting H0 (how much evidence against H0 we require). This value is determined arbitrarily, subjectively, or based on convention before conducting the test. When P-value ≤ α, they reject H0. When P-value > α, they fail to reject H0. Industry standards require a significance level α of 5%. Does the packaging machine need revision? What if the the P-value is 4.56%. What if the P-value is 5.01%

16 Test for a population mean (σ known)
To test H0: µ = µ0 using a random sample of size n from a Normal population with known standard deviation σ, we use the null sampling distribution N(µ0, σ√n). The P-value is the area under N(µ0, σ√n) for values of x̅ at least as extreme in the direction of Ha as that of our random sample. Calculate the z-value then use Table B or C. Or use technology.

17 P-value in one-sided and two-sided tests
One-sided (one-tailed) test Two-sided (two-tailed) test To calculate the P-value for a two-sided test, use the symmetry of the normal curve. Find the P-value for a one-sided test and double it.

18

19 From Table B, area left of z is 0.0228.  P-value = 2*0.0228 = 4.56%.
H0: µ = 227 g versus Ha: µ ≠ 227 g What is the probability of drawing a random sample such as this one or worse, if H0 is true? From Table B, area left of z is  P-value = 2* = 4.56%. Sampling distribution if H0 were true From Table C, two-sided P-value is between 4% and 5% (use |z|). σ/√n = 2.5g 2.28% Are our assumptions about the sampling distribution questionable? µ (H0) What should we conclude about the tomato sorting machine?

20 Confidence intervals to test hypotheses
Because a two-sided test is symmetric, you can easily use a confidence interval to test a two-sided hypothesis. In a two-sided test, C = 1 – α. C confidence level α significance level α /2 α /2 Packs of cherry tomatoes (σ = 5 g): H0: µ = 227 g versus Ha: µ ≠ 227 g Sample average 222 g. 95% CI for µ = 222 ± 1.96*5/√4 = 222 g ± 4.9 g 227 g does not belong to the 95% CI (217.1 to g). Thus, we reject H0.

21 Logic of confidence interval test
A sample gives a 99% confidence interval of With 99% confidence, could samples be from populations with µ =0.86? µ =0.85? Cannot reject H0: m = 0.85 Reject H0: m = 0.86 99% C.I. The Bad: A confidence interval doesn’t precisely gauge the level of significance. Reject or don’t reject H0 (Are significance tests really that much better?) The Great: It estimates a range of likely values for the true population mean µ. A P-value quantifies how strong the evidence is against the H0, but doesn’t provide any information about the true population mean µ.

22 CI vs. test of significance
Confidence intervals quantify the uncertainty in an estimate of a population parameter. Tests of significance evaluate statistically whether a particular statement is reasonable. Only small % p of samples would give x¯ so far from m under H0

23 The national average birth weight is 120 oz: N(natl =120,  = 24 oz).
An SRS of 100 poor mothers gave an average birth weight x̅ = 115 oz. Is significantly lower than the national average? Statistical Hypotheses: H0: poor = 120 oz (no difference with natl ) Ha: poor ≠ 120 oz We calculate the z score for x̅: In Table B, z = –2.08 gives area beyond =  P-value 3.7%. In Table C, we find that the P-value is between 2% and 4%. 2-sided


Download ppt "14. Introduction to inference"

Similar presentations


Ads by Google