Class Notes
(808,126)

Canada
(493,084)

University of Alberta
(12,880)

Statistics
(237)

STAT151
(146)

Susan Kamp
(11)

Lecture

# 21, 22.pdf

Unlock Document

University of Alberta

Statistics

STAT151

Susan Kamp

Fall

Description

Ch 20 Testing Hypotheses About Proportions
& Ch 21 More About Tests
Recall:
Background for a Large Sample Test concerning a
Probability Proportion p
For developing a test again the facts we know from the CLT
have to be considered. The point estimate for a probability of
success is the sample proportion p . From the CLT, we know
about the sampling distribution of p that:
1. p p
p(1 p)
2. p n
3. If n is large, the sampling distribution of p is approximately
normal.
Example:
Suppose p is the probability to get a HEAD when flipping a
coin. Eric claims that the coin is fair, but Amy wants to test if
Eric’s claim is true. She took a random sample of size 1000
showed 400 HEADs.
1 of 19 Based on this result, can we state that:
i) the proportion of heads occurring is less than 0.5 (so Eric’s
claim is invalid)? OR
ii) the difference between 0.5 (the population proportion of
heads) and 0.4 (the sample proportion of heads) may have
occurred because of sampling error?
In order to answer this question, we need to perform a
hypothesis test. State the hypothesis. Interpret rejection and
nonrejection of H fo0 this example.
H 0 versus H a
Rejection of H : 0
Nonrejection of H :
0
2 of 19 One Proportion z-Test
1. Assumption & Conditions:
- Randomization
- Independence
- The sample size n is large, that is:
np ≥ 10 and n(1 – p ) ≥ 10.
0 0
where p c0mes from the hypotheses.
2. Determine the type of test
a) two tailed:
a. H 0 p = p 0 versus H a p ≠ p 0
b)lower tailed:
a. H 0 p = p 0 versus H a p < p 0
c) upper tailed:
a. H 0 p = p 0 versus H a p > p 0
3. Test statistic:
Let p be a value between zero and one, and define the test
0
statistic
3 of 19 z p p0
p 01 p 0
n
4. p-value:
Test Type p-value
Upper Tail P(z > z o
Lower Tail P(z < z o
Two Tails 2 P(z > |z |o
= 2 P(z < -|z |)
o
5. Decision: Reject H , i0 and only if p-value ≤ α.
Example (con’t):
Suppose p is the probability to get a HEAD when flipping a
coin. Eric claims that the coin is fair, but Amy wants to test if
Eric’s claim is true. She took a random sample of size 1000
showed 400 HEADs.
4 of 19 Recall:
The 95% CI:
p(1 p) 400 0.40.6
p z* 1.96 0.4 0.03 [0.37, 0.43]
n 1000 1000
5 of 19 Example:
Suppose Amy wants to test if TAILs occurs more often than
HEADs now. She took a random sample of size 1000 showed
400 HEADs. Carry out a hypothesis test at level of significance
0.05.
Calculate the 90% CI for p:
6 of 19 Example:
A company claims to have 40% of the market for some product.
You suspect this number, so you conduct a survey and find 38
out of 112 buyers (ie. 34%) purchased this brand. Are these data
consistent with the company’s claim at α=0.05 level?
Let p be the true market share of this product.
7 of 19 Example:
Suppose that the proportion of adults above 40 who are
participating in fitness activities is 0.8 one year ago. An
advertising campaign that promotes fitness activities is launched
this year and you want to test whether the proportion is higher
now. Assume you take a random sample of n = 100 and the
number of people sampled who participate in those activities
equals 85. Carry out a hypothesis test at the level of
significance of 0.01 to test your claim.
8 of 19 Ch 22 Comparing Two Proportions
Estimating the Difference between Two Proportions
You may want to compare:
- the proportion of people who play computer games in the
age groups of 20 to 30 and 30 to 40.
- the proportion of defective items manufactured in two
production lines
The statistic for estimating the difference in two population
proportions ( p p ) that comes to mind is the difference in the
1 2
p pˆ
sample proportions ( 1 2).
Notation:
Population Sample
proportion size Proportion
Population 1 p1 n1 p1
Population 2 p 2 n 2 p2
9 of 19 Properties of the Sampling Distribution of the Difference
between two Independent Sample Proportions ( p 1 p ˆ 2)
Consider that you have two independent samples of sizes n and 1
n 2rom two populations with parameters p and p , resp1ctively.2
ˆ ˆ
The sampling distribution of ( p 1 p 2) has these properties:
1. The mean of ( p p ˆ ) is ˆ ˆ p p , so p p ˆ is an
1 2 p12 1 2 1 2
unbiased estimate for p1 p 2
2 p 11 p )1 p2(1 p )2
2. The variance p12 , so the
n 1 n2
p1(1 p )1 p 21 p )2
standard deviation is: p1p2 n n
1 2
3. If the sample sizes n and 1 are bot2 large, that is when
n1 1≥ 10 and n (1 –1p ) ≥ 11
and n p 2 20 and n (1 – p2) ≥ 10.2
4. With these properties, then the sampling distribution of
p 1 p ˆ 2approximately normal.
Two-Proportion z-Interval
p1(1 p1) p 21 p 2
(p1 p 2 z*
n1 n2
10 of 19 For this we must have the following assumptions and conditions
meet:
Independence Assumptions:
Randomization Condition: The data in each group
should be

More
Less
Related notes for STAT151