Presentation is loading. Please wait.

Presentation is loading. Please wait.

Confidence Intervals and Hypothesis tests with Proportions.

Similar presentations


Presentation on theme: "Confidence Intervals and Hypothesis tests with Proportions."— Presentation transcript:

1 Confidence Intervals and Hypothesis tests with Proportions

2 What happens to your confidence as the interval gets smaller? Your confidence level decreases with smaller intervals % % % %

3 Confidence level methodIs the success rate of the method used to construct the interval containUsing this method, ____% of the time the intervals constructed will contain the true population parameter

4 fromFound from the confidence level upper z-scoreThe upper z-score with probability p lying to its right under the standard normal curve Confidence leveltail areaz*.051.645.0251.96.0052.576 Critical value (z*).05 z*=1.645.025 z*=1.96.005 z*=2.576 90% 95% 99%

5 Confidence interval for a population proportion: Statistic + Critical value × Standard deviation of the statistic Margin of error But do we know the population proportion?

6 What are the steps for performing a confidence interval? 1.) Assumptions SRS of context Approximate Normal distribution because np > 10 & n(1-p) > 10 Population is at least 10n 2.) Calculations 3.) Conclusion We are ________% confident that the true proportion context is between ______ and ______.

7 As the confidence level increases, do the intervals generally get wider or more narrow? Explain. As the sample size increases, do the intervals generally get wider or more narrow? Explain. When 100 confidence intervals are generated, why are they all different? If the confidence level selected is 90%, about how many of 100 intervals will cover the true percentage of orange balls? Will exactly this number of intervals cover the true percentage each time 100 intervals are created? Explain.

8 A May 2000 Gallup Poll found that 38% of a random sample of 1012 adults said that they believe in ghosts. Find a 95% confidence interval for the true proportion of adults who believe in ghost.

9 Assumptions: Have an SRS of adults np =1012(.38) = 384.56 & n(1-p) = 1012(.62) = 627.44 Since both are greater than 10, the distribution can be approximated by a normal curve Population of adults is at least 10,120. We are 95% confident that the true proportion of adults who believe in ghosts is between 35% and 41%. Step 1: check assumptions! Step 2: make calculations Step 3: conclusion in context

10 The manager of the dairy section of a large supermarket took a random sample of 250 egg cartons and found that 40 cartons had at least one broken egg. Find a 90% confidence interval for the true proportion of egg cartons with at least one broken egg.

11 Assumptions: Have an SRS of egg cartons np =250(.16) = 40 & n(1-p) = 250(.84) = 210 Since both are greater than 10, the distribution can be approximated by a normal curve Population of cartons is at least 2500. We are 90% confident that the true proportion of egg cartons with at least one broken egg is between 12.2% and 19.8%. Step 1: check assumptions! Step 2: make calculations Step 3: conclusion in context

12 Another Gallop Poll istaken in order to measure the proportion of adults who approve of attempts to clone humans. What sample size is necessary to be within + 0.04 of the true proportion of adults who approve of attempts to clone humans with a 95% Confidence Interval? To find sample size: However, since we have not yet taken a sample, we do not know a p-hat (or p) to use!

13 Another Gallop Poll is taken in order to measure the proportion of adults who approve of attempts to clone humans. What sample size is necessary to be within + 0.04 of the true proportion of adults who approve of attempts to clone humans with a 95% Confidence Interval? Use p-hat =.5 Divide by 1.96 Square both sides Round up on sample size

14 What are hypothesis tests? Calculations that tell us if the sample statistics (p-hat) occurs by random chance or not OR... if it is statistically significant Is it... –a random occurrence due to natural variation? –an occurrence due to some other reason? NOT Statistically significant means that it is NOT a random chance occurrence! Is it one of the sample proportions that are likely to occur? Is it one that isn’t likely to occur? test statistic These calculations (called the test statistic) will tell us how many standard deviations a sample proportion is from the population proportion!

15 Steps: 1)Assumptions 2)Hypothesis statements & define parameters 3)Calculations 4)Conclusion, in context

16 Assumptions for z-test: Have an SRS of context Distribution is (approximately) normal because both np > 10 and n(1-p) > 10 Population is at least 10n YEA YEA – These are the same assumptions as confidence intervals!!

17 How to write hypothesis statements Null hypothesis – is the statement (claim) being tested; this is a statement of “no effect” or “no difference” Alternative hypothesis – is the statement that we suspect is true H0:H0:H0:H0: Ha:Ha:Ha:Ha:

18 How to write hypotheses: Null hypothesis H 0 : parameter = hypothesized value Alternative hypothesis H a : parameter > hypothesized value H a : parameter < hypothesized value H a : parameter = hypothesized value

19 Facts to remember about hypotheses: Hypotheses ALWAYS refer to populations (use parameters – never statistics) The alternative hypothesis should be what you are trying to prove! ALWAYS define your parameter in context!

20 Activity: For each pair of hypotheses, indicate which are not legitimate & explain why Must use parameter (population) x is a statistics (sample)  is the population proportion! Must use same number as H 0 ! P-hat is a statistic – Not a parameter! Must be NOT equal!

21 P-value - as extreme or moreAssuming H 0 is true, the probability that the statistic would have a value as extreme or more than what is actually observed Notice that this is a conditional probability The statistic is our p-hat! Why not find the probability that the p-hat equals a certain value? Remember that in continuous distributions, we cannot find probabilities of a single value!

22 P-values - as extreme or moreAssuming H 0 is true, the probability that the statistic would have a value as extreme or more than what is actually observed In other words... What is the probability of getting values more (or less) than our p-hat? We can use normalcdf to find this probability.

23 Level of significance - Is the amount of evidence necessary before we begin to doubt that the null hypothesis is true Is the probability that we will reject the null hypothesis, assuming that it is true Denoted by  –Can be any value –Usual values: 0.1, 0.05, 0.01 –Most common is 0.05

24 Statistically significant – as small smallerOur statistic (p-hat) is statistically significant if the p-value is as small or smaller than the level of significance (  ). Decisions: rejectIf p-value < , “reject” the null hypothesis at the  level. fail to rejectIf p-value > , “fail to reject” the null hypothesis at the  level. Our “guilty” verdict. Our “not guilty” verdict. Remember that the verdict is never “innocent” – so we can never decide that the null is true!

25 Facts about p-values: ALWAYS make the decision about the null hypothesis! Large p-values show support for the null hypothesis, but never that it is true! Small p-values show support that the null is not true. Double the p-value for two-tail (≠) tests Never acceptNever accept the null hypothesis!

26 Never “accept” the null hypothesis!

27 Calculating p-values For z-test statistic (z) – –Use normalcdf(lb,ub) to find the probability of the test statistic or more extreme –Remember the standard normal curve is comprised of z’s where  = 0 and  = 1 We will see how to compute this value tomorrow. Since we are in the standard normal curve, we do not need  here.

28 Writing Conclusions: 1)A statement of the decision being made (reject or fail to reject H 0 ) & why (linkage) 2)A statement of the results in context. (state in terms of H a ) AND

29 “Since the p-value ) , I reject (fail to reject) the H 0. There is (is not) sufficient evidence to suggest that H a.” Be sure to write H a in context (words)!

30 Formula for hypothesis test:

31 Example 5: A company is willing to renew its advertising contract with a local radio station only if the station can prove that more than 20% of the residents of the city have heard the ad and recognize the company’s product. The radio station conducts a random sample of 400 people and finds that 90 have heard the ad and recognize the product. Is this sufficient evidence for the company to renew its contract?

32 Assumptions: Have an SRS of people np = 400(.2) = 80 & n(1-p) = 400(.8) = 320 - Since both are greater than 10, this distribution is approximately normal. Population of people is at least 4000. H 0 : p =.2where p is the true proportion of people who H a : p >.2heard the ad Since the p-value > , I fail to reject the null hypothesis. There is not sufficient evidence to suggest that the true proportion of people who heard the ad is greater than.2. The company will not renew their advertising contract with the radio station. Use the parameter in the null hypothesis to check assumptions! Use the parameter in the null hypothesis to calculate standard deviation!

33 Calculate the appropriate confidence interval for the above problem. CI = (.19066,.25934) How do the results from the confidence interval compare to the results of the hypothesis test? The confidence interval contains the parameter of.2 thus providing no evidence that more than 20% had heard the ad.

34 Two-Sample Proportions Inference

35 Assumptions: TwoindependentTwo, independent SRS’s from populations ( or randomly assigned treatments) Populations at least 10n Normal approximation for both

36 Formula for confidence interval: Note: use p-hat when p is not known Standard error! Margin of error!

37 Example 1: At Community Hospital, the burn center is experimenting with a new plasma compress treatment. A random sample of 316 patients with minor burns received the plasma compress treatment. Of these patients, it was found that 259 had no visible scars after treatment. Another random sample of 419 patients with minor burns received no plasma compress treatment. For this group, it was found that 94 had no visible scars after treatment. What is the shape & standard error of the sampling distribution of the difference in the proportions of people with no visible scars between the two groups? Since n 1 p 1 =259, n 1 (1-p 1 )=57, n 2 p 2 =94, n 2 (1-p 2 )=325 and all > 10, then the distribution of difference in proportions is approximately normal.

38 Example 1: At Community Hospital, the burn center is experimenting with a new plasma compress treatment. A random sample of 316 patients with minor burns received the plasma compress treatment. Of these patients, it was found that 259 had no visible scars after treatment. Another random sample of 419 patients with minor burns received no plasma compress treatment. For this group, it was found that 94 had no visible scars after treatment. What is a 95% confidence interval of the difference in proportion of people who had no visible scars between the plasma compress treatment & control group?

39 Assumptions: Have 2 independent randomly assigned treatment groups Both distributions are approximately normal since n 1 p 1 =259, n 1 (1-p 1 )=57, n 2 p 2 =94, n 2 (1-p 2 )=325 and all > 5 Population of burn patients is at least 7350. Since these are all burn patients, we can add 316 + 419 = 735. If not the same – you MUST list separately. We are 95% confident that the true the difference in proportion of people who had no visible scars between the plasma compress treatment & control group is between 53.7% and 65.4%

40 Example 2: Suppose that researchers want to estimate the difference in proportions of people who are against the death penalty in Texas & in California. If the two sample sizes are the same, what size sample is needed to be within 2% of the true difference at 90% confidence? Since both n’s are the same size, you have common denominators – so add! n = 3383

41 Hypothesis statements: H 0 : p 1 - p 2 = 0 H a : p 1 - p 2 > 0 H a : p 1 - p 2 < 0 H a : p 1 - p 2 ≠ 0 Be sure to define both p 1 & p 2 ! H 0 : p 1 = p 2 H a : p 1 > p 2 H a : p 1 < p 2 H a : p 1 ≠ p 2

42 Since we assume that the population proportions are equal in the null hypothesis, the variances are equal. Therefore, we pool the variances!

43 Formula for Hypothesis test: Usually p 1 – p 2 =0

44 Example 4: A forest in Oregon has an infestation of spruce moths. In an effort to control the moth, one area has been regularly sprayed from airplanes. In this area, a random sample of 495 spruce trees showed that 81 had been killed by moths. A second nearby area receives no treatment. In this area, a random sample of 518 spruce trees showed that 92 had been killed by the moth. Do these data indicate that the proportion of spruce trees killed by the moth is different for these areas?

45 Assumptions: Have 2 independent SRS of spruce trees Both distributions are approximately normal since n 1 p 1 =81, n 1 (1-p 1 )=414, n 2 p 2 =92, n 2 (1-p 2 )=426 and all > 10 Population of spruce trees is at least 10,130. H 0 : p 1 =p 2 where p 1 is the true proportion of trees killed by moths H a : p 1 ≠p 2 in the treated area p 2 is the true proportion of trees killed by moths in the untreated area P-value = 0.5547  = 0.05 Since p-value > , I fail to reject H 0. There is not sufficient evidence to suggest that the proportion of spruce trees killed by the moth is different for these areas


Download ppt "Confidence Intervals and Hypothesis tests with Proportions."

Similar presentations


Ads by Google