Professional Documents
Culture Documents
2
Basics of Hypothesis Testing
Objective
For a population parameter (p, , ) we wish
to test whether a predicted value is close to
the actual value (based on sample values).
Definitions
In statistics, a Hypothesis is a claim or
statement about a property of a population.
A Hypothesis Test is a standard procedure
for testing a claim about a property of a
population.
Ch. 8 will cover hypothesis tests about a
Proportion p
Mean ( known or unknown)
Standard Deviation
2
Example 1
Claim: The XSORT method of gender selection
increases the likelihood of birthing a girl.
(i.e. increases the proportion of girls born)
Components of a
Hypothesis Test
Null Hypothesis: H0
Alternative Hypothesis: H1
5
Null Hypothesis: H0
The null hypothesis (denoted H0)
is a statement that the value of a
population parameter (p, , ) is
equal to some claimed value.
We test the null hypothesis directly. It
will either reject H0 or fail to reject H0
(i.e. accept H0)
Example
H0: p = 0.6
H1: p < 0.6
6
Alternative Hypothesis: H1
The alternative hypothesis (denoted H1)
is a statement that the parameter has a
value that somehow differs from the null
hypothesis.
The difference will be one of <, >,
(less than, greater than, doesnt equal)
Example
H0: p = 0.6
H1: p < 0.6
7
Example 1
Claim: The XSORT method of gender selection
increases the likelihood of birthing a girl.
H0 : p = 0.5
The alternative hypothesis states the difference:
H1 : p > 0.5
Here, the original claim is the alternative hypothesis
Example 1
Continued
Example 2
Claim: For couples using the XSORT method, the
likelihood of having a girl is 50%
Again, let p denote the proportion of girls born.
The claim is equivalent to p=0.5
The null hypothesis must say equal to:
H0 : p = 0.5
The alternative hypothesis states the difference:
H1 : p 0.5
Here, the original claim is the null hypothesis
10
Example 2
Continued
11
Example 3
Claim: For couples using the XSORT method, the
likelihood of having a girl is at least 50%
Again, let p denote the proportion of girls born.
The claim is equivalent to p 0.5
The null hypothesis must say equal to:
H0 : p = 0.5
The alternative hypothesis states the difference:
H1 : p < 0.5
12
Example 3
Continued
13
General rules
If the null hypothesis is rejected,
the alternative hypothesis is accepted.
H0 rejected H1 accepted
14
Type I Error
A Type I error is the mistake of rejecting
the null hypothesis when it is actually true.
Also called a True Negative
True: means the actual hypothesis is true
Negative: means the test rejected the hypothesis
Type II Error
A Type II error is the mistake of accepting
the null hypothesis when it is actually false.
Also called a False Positive
False: means the actual hypothesis is false
Positive: means the test failed to reject the hypothesis
17
Example 4
Claim: A new medication has greater success rate (p)
than that of the old (existing) machine (p0)
p: Proportion of success for the new medication
p0: Proportion of success for the old medication
The claim is equivalent to p > p0
Null hypothesis:
H0 : p = p0
Alternative hypothesis:
H1 : p > p0
Example 4
Continued
Type I error
H1 : p > p0
Type II error
H1 is true, but we reject it We reject the claim
So we decline the new medicine and continue with the old one.
(no direct harm)
19
Significance Level
The probability of a type I error (denoted ) is
also called the significance level of the test.
Characterizes the chance the test will fail.
(i.e. the chance of a type I error)
20
Critical Region
Consider a parameter (p, , , etc.)
The guess for the parameter will have a probability
that follows a certain distribution (z, t, 2,etc.)
Note: This is just like what we used to calculate CIs.
Example
p follows a z-distribution
If we guess p > p0 the critical region is defined by the
right tail whose area is
t
If we guess p < p0 the critical region is defined by the
left tail whose area is
-t
If we guess p p0 the critical region is defined by the
two tails whose areas are /2
-t/2
t/2
22
23
Example 5
Claim: The XSORT method of gender selection
increases the likelihood of birthing a girl.
Suppose 14 couples using XSORT had 13 girls and 1 boy.
Test the claim at a 5% significance level
1. State H0 and H1
H0 : p = 0.5
H1 : p > 0.5