Hypothesis Testing for Proportions Business Statistics
Plan for Today • • • • • •
Recall: proportions and percentages Hypothesis testing for proportions Classical approach Examples p-value approach Examples
1
Example: headline
Percentages and proportions 𝑃𝑎𝑟𝑡 𝑃𝑒𝑟𝑐𝑒𝑛𝑡 = 𝑊ℎ𝑜𝑙𝑒 100
Proportions can be measured in terms of %, fractions, or decimals. Example: in a class of 35 students, 26 received a passing grade. 26 35
= 0.7429 or 74.29%
About 74% of students received passing grades.
2
Dealing with proportions • The underlying distribution for proportions is the binomial distribution. Recall that The probability of success is p The probability of failure is 𝑞 = 1 − 𝑝 The mean 𝜇 = 𝑛𝑝, the SD 𝜎 = 𝑛𝑝𝑞 The conditions: 𝑛𝑝 > 5 and 𝑛𝑞 > 5 To use the normal distribution 𝑥 𝑛𝑝 𝑛𝑝𝑞 𝑝𝑞 𝑝′ = ~𝑁 , = 𝑁 𝑝, 𝑛 𝑛 𝑛 𝑛
Sample vs Population • We denote by p the population proportion. • It is not known, but p is in the hypotheses. • We denote by 𝜎𝑠 =
𝑝∙𝑞 𝑛
the sampling
standard deviation • The sample proportion is denoted by 𝑝′ • If a sample of size n has x successes, then
𝑝′
𝑥 = 𝑛
3
Null and Alternative Hypotheses • The null hypothesis (H0) : It is a statement about the population that either is believed to be true or is used to put forth an argument unless it can be shown to be incorrect beyond a reasonable doubt. • The alternative hypothesis (Ha): It is a claim about the population that is contradictory to H0 and what we conclude when we reject H0.
Examples of hypotheses • 𝐻0 : 𝑝 ≥ 0.35 𝐻𝑎 : 𝑝 < 0.35 a left-tailed test • 𝐻0 : 𝑝 ≤ 0.35 𝐻𝑎 : 𝑝 > 0.35 a right-tailed test • 𝐻0 : 𝑝 = 0.35 𝐻𝑎 : 𝑝 ≠ 0.35 a two-tailed test
4
Alpha and beta 𝛼 is the level of significance of the test It equals the probability of making a type I error. 1 − 𝛼 equals the probability of making type A correct decision 𝛽 is the probability of making a type II error. 1 − 𝛽 is called the Power of the Test. It equals the probability of making type B correct decision.
Classical approach: critical values • A two-tailed test: the critical values ±𝑧(𝛼 2)
• A right-tailed test: the critical value 𝑧(𝛼) • A left-tailed test: the critical value −𝑧(𝛼)
5
Hypothesis testing (classical approach) 1. State the hypotheses H0 and Ha. 2. Compute: 𝜎𝑠 =
𝑝∙𝑞 𝑛
, 𝑝′ =
𝑥 𝑛
, 𝑧∗ =
𝑝′−𝑝 𝜎𝑠
3. Find the critical value(s) in the table. 4. Draw a bell-shaped curve and indicate the region(s) of rejection. 5. Place the test statistic 𝑧∗ onto the graph. 6. State your decision.
Example: teenage smokers • According to a 2004 survey, about 12.7% of Canadian teenagers were regular or occasional smokers. • A recent survey of 215 teenagers found that 21 of them are smokers. • Test at a 4% significance level whether the percentage of regular or occasional smokers among teenagers has decreased since 2004.
6
Example: teenage smokers (continued) 1. 𝐻0 : 𝑝 ≥ 0.127 , 𝐻𝑎 : 𝑝 < 0.127 2. 𝜎𝑠 = 0.0227 , 𝑝′ = 0.0977 , 𝑧∗ = −1.29 3. The critical value: −𝑧 = −1.75 4. and 5. see 6. Test statistic is in the region of acceptance. Decision: Fail to reject H0
Examples: smartphones According to the pewinternet.org website, 64% of adult Americans own a smartphone. A researcher wanted to test this claim and selected a random sample of 150 adult Americans, out of which 109 turned out to own a smartphone. Test at a 5% level of significance whether the proportion of adult Americans who own a smartphone is actually different from 64%.
7
Example: smartphones (continued) 1. 𝐻0 : 𝑝 = 0.64 , 𝐻𝑎 : 𝑝 ≠ 0.64 2. 𝜎𝑠 = 0.0392 , 𝑝′ = 0.7267, 𝑧∗ =
𝑝′ −𝑝 𝜎𝑠
= 2.21
3. The critical values: ±𝑧(𝛼 2) = ±1.96 (two-tailed test) 4. and 5. see 6. Test statistic is in the region of rejection. Decision: Reject H0
Recall: the p-value • Right-tailed test: the area to the right of 𝑧∗ • Left-tailed test: the area to the left of 𝑧∗
http://www. mathcaptain.com
• Two-tailed test: twice the area
8
Hypothesis testing (p-value approach) 1. State the hypotheses H0 and Ha. 2. Compute: 𝜎𝑠 =
𝑝∙𝑞 𝑛
, 𝑝′ =
𝑥 𝑛
, 𝑧∗ =
𝑝′−𝑝 𝜎𝑠
3. Is this a left-, right-, or a two-tailed test? 4. Find the corresponding p-value in the table. 5. Compare the p-value with the level of significance 𝛼 . 6. State your decision.
Example: students and sleep A published article from the University of Alabama claims that 60% of university students do not get enough sleep. A researcher at Brown university followed a sample of 131 students and found that 86 of them do not get enough sleep. Test at a 5% level of significance whether more than 60% of students at Brown university do not get enough sleep.
© 2015 Rhino Press
9
Example: students and sleep (continued) 1. 𝐻0 : 𝑝 ≤ 0.6 2. 𝜎𝑠 =
0.6∙0.4 131
𝐻𝑎 : 𝑝 > 0.6 = 0.0428 , 𝑝′ =
Test statistic: 𝑧∗ = 3. 4. 5. 6.
0.6565−0.6 0.0428
86 131
= 0.6565
= 1.32
This is a right-tailed test . p-value = 0.5 − 𝑇 1.32 = 0.5 − 0.4066 = 0.0934 p-value = 0.0934 > 0.05 = 𝛼 Decision: Fail to reject H0.
Example: lost luggage An airline company claims that 90% of lost luggage is returned to its owners within 24 hours. A manager for this company has decided to test this and followed a random sample of 140 lost luggage reports. In 117 cases out of 140, the lost luggage was reunited with its owners within a 24 hour period. Test at a 2% level of significance whether the airline’s claim is valid.
10
Example: lost luggage (continued) 1. 𝐻0 : 𝑝 = 0.9 , 2. 𝜎𝑠 =
0.9∙0.1 140
𝐻𝑎 : 𝑝 ≠ 0.9
= 0.0254 , 𝑝′ =
117 140
= 0.8357 ,
test statistic 𝑧∗ = −2.53 3. This is a two-tailed test 4. p-value = 2 ∙ 0.5 − 0.4943 = 0.0114 5. p-value = 0.0114 < 0.02 = 𝛼 6. Decision: Reject H0
Example: practice According to the website www.telefilm.ca , 61% of all Canadians saw a film in a movie theater during the last year. A recent survey of 200 Canadians revealed that 137 of them saw a film in a movie theater during the last year. Test at a 2% level of significance whether the proportion of Canadians who saw a film in a movie theater during the last year is actually higher than 61%.
Use both, the classical, and the p-value approaches.
11
Example: practice It was estimated that 20% of adult Americans suffer from some degree of hearing loss. A researcher has selected a random sample of 340 adult Americans and found that 58 of them suffer from some degree of hearing loss. Can you test at a 10% level of significance whether the actual percentage of adult Americans suffering from some degree of hearing loss is different from 20%?
12