0% found this document useful (0 votes)
22 views

Chapter 20

Chapter 20

Uploaded by

Assem Hefny
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

Chapter 20

Chapter 20

Uploaded by

Assem Hefny
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

STT200 Chapter 20 KM AM

Chapter 20 Testing Hypotheses about Proportions

Problem: Suppose we tossed a coin 100 times and we have obtained 38


Heads and 62 Tails. Is the coin biased toward tails?

There is no way to say yes or no with 100% certainty. But we may evaluate the
strength of support to the hypothesis that "the coin is biased".

In statistics, a hypothesis is a claim or statement about a parameter (a


property of a population).
A hypothesis test (or “test of significance”) is a standard procedure for
testing a claim.
If, under a given assumption, we observe an event with likelihood exceptionally
small, we conclude that the assumption is probably not correct.

We start by making two statements called the Hypotheses:

Null hypothesis (denoted by H0) is a statement about an established fact, no


change of known value of a population parameter. Expressed as Math equation it
must contain a condition of equality: =, , or . We replace all of above with a
simple “=”
Example: H0: the coin is fair, and 50% of tosses end with H.

Alternative hypothesis (denoted by H1 or Ha) is the statement that the


parameter has a value that somehow differs from the null hypothesis. Needs a
strong support from data to change our thinking and contradicts Ho. Expressed
as Math statement it contains , <, or >

Example: We contradict the statement that the coin is fair. Three ways are
possible: the coin is biased toward heads (proportion of heads is bigger than
tails). Or – it is less. Or – simply – not equal to 50%

In practice, there are three 3 ways to set up the hypotheses:

1. H0: the parameter= given number, H1: the parameter ≠ given number (2 tails)
2. H0: the parameter= given number, H1: the parameter < given number (left tail)
3. H0: the parameter= given number, H1: the parameter > given number (right
tail
Example: Set up the hypotheses

Summarizing “Testing a coin”: If p is the probability that the coin turns “Heads”
state both hypotheses

Page 1 of 9
STT200 Chapter 20 KM AM

Back to Problem: Suppose we tossed a coin 100 times and we have


obtained 38 Heads and 62 Tails. Is the coin biased toward tails?

HO: coin is fair, p = 0.5 (population proportion of heads is the same as tails)

H1: there are three ways to disagree with Ho. We can say:

 coin is biased toward heads, p > 0.5 (more heads than tails were
observed), or
 coin is biased toward tails p<0.5(less heads than tails), or
 coin is biased p≠0.5 (the numbers of heads and tails are
not nearly equal)

Exercises:

For each of the following claims, determine the null and alternative hypotheses.
State whether the test is two-tailed, left-tailed or right-tailed.
a) In 2008, 62% of American adults regularly volunteered their time for
charity work. A researcher believes that this percentage is different
today.

b) According to a study published in March, 2006 the mean length of a


phone call on a cellular telephone was 3.25 minutes. A researcher
believes that the mean length of a call has increased since then.

Attitude: Assume that the null hypothesis HO is true and uphold it, unless data
strongly speaks against it.

Test the Null Hypothesis directly.


In conclusion: Reject H0 or fail to reject H0
NEVER reject or fail to reject the alternative, H1. NEVER state that any
hypothesis is “proven”.

Assumptions: We assume that all conditions for CLT are met: large enough
random sample (more than 10 successes and failures), but at the same time,
“small enough” sample (less than 10% of the population).
Method: By CLT the statistic p-hat has approximately normal distribution with the
center at population proportion p and standard deviation

(In this formula, p, often denoted as po, is the population


proportion of interest stated in Ho, and q, or qo=1-po, and n=sample size)

Page 2 of 9
STT200 Chapter 20 KM AM

Test mechanics: From data compute the value of a proper test statistics. In our
example test statistic is the z-score computed for your observed statistic 𝑝̂ :
( pˆ  pO )
z
SD ( p0 )

where p0 is the HO value of the parameter (in our example, p0 =0.5).


If HO is correct then our z-score should be close to 0, the center of z-distribution.
If it is far from what is expected under the null model HO assumption, then we
reject HO.

H0: p=0.5 H1: p<0.5


ˆ  0.38,
p pO  0.50
if H 0 is true, if the coin is fair, then
pO qO 0.5  0.5
SD ( p0 )    0.05
n 100

( pˆ  pO ) (.38  .50 )
z   2.4
SD( pˆ ) 0.05

Our observed proportion 0.38 has been translated into a z-score z=-2.4
How far down is z=-2.4 from 0? How likely is to see z=-2.4 or less assuming HO
were true, that is, that the coin is not biased? To answer this we’ll find P(z<-2.4)

Level of significance α: Should be selected before we attempt to solve the


problem.
It separates “likely” from “unlikely” events.

P-value: The probability of obtaining a test statistic at least as extreme as the


one actually obtained, assuming null hypothesis is true.

P-value is the smallest level of significance at which we can reject null


hypothesis. It measures the strength of evidence against null hypothesis. The
smaller p-value the stronger evidence against HO

In this problem let’s agree to α=1%: if P-value is larger than 1%, then our
observed statistic does not give sufficient evidence that the coin is unfair. If the
P-value is less than the level of significance α, then we got sufficient evidence to
reject Ho.

Page 3 of 9
STT200 Chapter 20 KM AM

In our example P-value = P(z<-2.4) =


0.0082, less than 1%.
Meaning: if the coin is fair, then the
probability of observing 38 or fewer heads
in 100 tosses is less than 1%.

Conclusion: Two statements


1. Decide if you reject Ho or not (only one
of the two options is possible
 We reject HO
 We fail to reject HO
2. Answer the original question (ex. support the claim that… or, do not support
the claim that…)

In our example the conclusion is:


Reject the null hypothesis that the coin is fair (at significance level 0.01) and
support H1 stating that the coin is biased toward tails.

SUMMARY - One-proportion z-test


Assumptions
1. Random sample
2. Independent observations
3. If sampling without replacement, the sample size n should be no more than
10% of the population.
4. "Large" sample size n (np >10 and nq >10)

Hypotheses:

 Null hypothesis HO: p = pO


 Alternative hypothesis HA: p > pO or HA: p < pO or HA: p ≠ pO

Attitude: Assume that the null hypothesis HO is true and uphold it, unless data
strongly speaks against it.

Level of significance α (more about it in the next chapter): it is marked alpha


(α); we treat is as a threshold between “likely” and “unlikely” value of our test
statistic; helps to make a decision about Ho.
Common significance levels: =0.10, =0.05, =0.01 (but can be another)

Test statistic:
ˆ  pO
p
z
SD ( pO )
pO qO
where pˆ is a sample proportion, and SD( pˆ ) 
n
Page 4 of 9
STT200 Chapter 20 KM AM

Distribution: If HO is true, then test statistic z is approximately standard normal


(and should be close to 0).

Let zo be the observed value of the test statistic. The way we compute the P-
value depends on HA

Decision:
 if the P-value is smaller than or equal α, we reject HO at the significance
level α,

 if the P-value is bigger than α, we fail to reject HO at the significance level α

Note: we do not EVER “accept” or “prove” null hypothesis!

Classwork

Page 5 of 9
STT200 Chapter 20 KM AM

Test an appropriate hypothesis and state your conclusion. Perform the test at
significance level=5%.
Page 6 of 9
STT200 Chapter 20 KM AM

*********************************************************************
For a possible bonus: “critical region”, or
“classical” method.

“To do” list for Hypotheses Testing

a. What is being tested? The population mean, or population proportion?


_______

b. Hypotheses. H0: ________________ vs. H1 :


________________.

c. Type of the test : Right/Left Tail or Two-Tail Test? __________

Significance level: α=…….. (if not given, 5%)

d. Calculate test statistic:

e. Choose the method or use both


I Rejection region: Find the critical value and mark clearly the rejection
region and critical value on the graph.

If α = ____ then z =__________,

Test statistic is / is not in the rejection region.

II: P-value method:

P-value=________ (Mark clearly P-value and the


test statistic)

Compare with : P-value< α or P-value > α?

f. The conclusion (Two statements):

Page 7 of 9
STT200 Chapter 20 KM AM

a) Reject/fail to reject H0

b) Support / do not support the alternative, that is, the claim that …..

Page 8 of 9
STT200 Chapter 20 KM AM

Example:
A researcher obtains a random sample of 1000 people and finds that 534 are in
favor of the banning cell phone use while driving, so p-hat = 534/1000. Does
this suggest that the majority, that is, more than 50% of people favor the policy?
In other words, would it be unusual to obtain a sample proportion of 0.534 or
higher from a population whose proportion is 0.5? What is convincing, or
statistically significant, evidence?

When observed results are unlikely under the assumption that the null hypothesis
is true, we say the result is statistically significant. When results are found to
be statistically significant, we reject the null hypothesis.

Hypothesis testing procedure;


Step 1 – check the assumptions (above) and determine the hypotheses
There are three ways to set up a hypothesis testing problem:

Our choice of the hypotheses:


Ho: no difference. The same proportion favors as does not favor new policy.
H1: the majority favors new policy. Write mathematical statements:

Ho: p=.50 H1: p>0.5

Step 2 - Select a level of significance, α, based on the seriousness of making a


Type I error (the more serious consequences, the smaller alpha). Typical error is
alpha = 0.05 or 5%

Step 3 – Compute test statistic using p0, not p-hat, to compute standard error

.534  .5
Z0   2.15
.5  0.5 /1000

Step 4 – either Classical or Modern approach

Modern:

Page 9 of 9
STT200 Chapter 20 KM AM

P-value (the probability that your observation is AT LAST as extreme as you found
it if the null hypothesis is true)
Its value equals the area of the corner(s) cut by the test statistic(s):
P(p-hat>0.534)=normalcdf(.534, 1, 0.5, 0.5*0.5 /1000  0.0158

Compare P-value against alpha:


P-value<α=5%. Our observed proportion is unusual (unusually small, or unusually large).
We conclude that null hypothesis is not right.

Conclusion: Reject null hypothesis. Support alternative hypothesis which said that the majority
of the population favors banning cell phones while driving.

Classical method:

Find zα/2 and Critical Region:


Alpha = 5%.
The problem is a right-tail problem.
z-score (a number of standard deviations)
separating 5% in a right corner of normal distribution
is 1.645
.534  .5
Our test statistic is Z0   2.15
.5  0.5 /1000

Our z-statistic is in critical (Rejection) region. Reject Ho!

Step 5: Conclusion (both methods give the same result)

Basing on our data, at 5% significance level we reject null hypothesis that there is a fifty-fifty
support. We have enough evidence to support the claim that the majority does support new
policy.

Page 10 of
9

You might also like