1 / 45

Confidence Intervals and Hypothesis tests with Proportions

Confidence Intervals and Hypothesis tests with Proportions. What happens to your confidence as the interval gets smaller?. Your confidence level decreases with smaller intervals. %. %. %. %. Confidence level . Is the success rate of the method used to construct the interval

chi
Download Presentation

Confidence Intervals and Hypothesis tests with Proportions

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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 • Is the success rate of the methodused to construct the interval • Using this method, ____% of the time the intervals constructed will contain the true population parameter

  4. .05 .025 .005 Critical value (z*) • Found from the confidence level • The upper z-score with probability p lying to its right under the standard normal curve Confidence level tail area z* .05 1.645 .025 1.96 .005 2.576 z*=1.645 z*=1.96 z*=2.576 90% 95% 99%

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

  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. Step 1: check assumptions! Step 2: make calculations Step 3: conclusion in context We are 95% confident that the true proportion of adults who believe in ghosts is between 35% and 41%.

  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. Step 1: check assumptions! Step 2: make calculations Step 3: conclusion in context We are 90% confident that the true proportion of egg cartons with at least one broken egg is between 12.2% and 19.8%.

  12. To find sample size: However, since we have not yet taken a sample, we do not know a p-hat (or p) to use! 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?

  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? These calculations (called the test statistic) will tell us how many standard deviations a sample proportion is from the population proportion! Is it one of the sample proportions that are likely to occur? 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? Statistically significant means that it is NOT a random chance occurrence! Is it one that isn’t likely to occur?

  15. Steps: • Assumptions • Hypothesis statements & define parameters • Calculations • Conclusion, in context

  16. Assumptions for z-test: Have an SRSof context Distribution is (approximately) normalbecausebothnp > 10andn(1-p) > 10 Population is at least 10n 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: Ha:

  18. How to write hypotheses: Null hypothesis H0: parameter = hypothesized value Alternative hypothesis Ha: parameter > hypothesized value Ha: parameter < hypothesized value Ha: 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. Must use parameter (population) x is a statistics (sample) Activity: For each pair of hypotheses, indicate which are not legitimate & explain why Must be NOT equal! p is the population proportion! Must use same number as H0! P-hat is a statistic – Not a parameter!

  21. P-value - The statistic is our p-hat! • Assuming H0 is true,the probability that the statistic would have a value as extreme or morethan what is actually observed Notice that this is a conditional probability 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 - We can use normalcdf to find this probability. • Assuming H0 is true,the probability that the statistic would have a value as extreme or morethan what is actually observed In other words . . . What is the probability of getting values more (or less) than our p-hat?

  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 a • Can be any value • Usual values: 0.1, 0.05, 0.01 • Most common is 0.05

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

  25. Facts about p-values: • ALWAYSmake 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 accept the null hypothesis!

  26. Never“accept” the null hypothesis! Never“accept” the null hypothesis! 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 m = 0 and s = 1 We will see how to compute this value tomorrow. Since we are in the standard normal curve, we do not need m, s here.

  28. Writing Conclusions: • A statement of the decision being made (reject or fail to reject H0) & why (linkage) • A statement of the results in context. (state in terms of Ha) AND

  29. “Since the p-value < (>) a, I reject (fail to reject) the H0. There is (is not) sufficient evidence to suggest that Ha.” Be sure to write Ha 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. Use the parameter in the null hypothesis to check assumptions! H0: p = .2 where p is the true proportion of people who Ha: p > .2 heard the ad Use the parameter in the null hypothesis to calculate standard deviation! Since the p-value > a, 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.

  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: • Two, independent SRS’s from populations ( or randomly assigned treatments) • Populations at least 10n • Normal approximation for both

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

  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 n1p1=259, n1(1-p1)=57, n2p2=94, n2(1-p2)=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 n1p1=259, n1(1-p1)=57, n2p2=94, n2(1-p2)=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: H0: p1 - p2 = 0 Ha: p1 - p2 > 0 Ha: p1 - p2 < 0 Ha: p1 - p2 ≠ 0 H0: p1 = p2 Be sure to define both p1 & p2! Ha: p1 > p2 Ha: p1 < p2 Ha: p1 ≠ p2

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

  43. Formula for Hypothesis test: Usually p1 – p2 =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 n1p1=81, n1(1-p1)=414, n2p2=92, n2(1-p2)=426 and all > 10 • Population of spruce trees is at least 10,130. H0: p1=p2 where p1 is the true proportion of trees killed by moths Ha: p1≠p2 in the treated area p2 is the true proportion of trees killed by moths in the untreated area P-value = 0.5547 a = 0.05 Since p-value > a, I fail to reject H0. There is not sufficient evidence to suggest that the proportion of spruce trees killed by the moth is different for these areas

More Related