Vous êtes sur la page 1sur 40

Chapter 13

Wednesday, June 16th


Hypothesis testing for quantitative
data
In previous Chapters we learn how to test
statements about pproportion
p or difference
between proportions.
In this Chapter we will learn how to test
statements about the mean, or the
difference between two population means
(dependent or independent)
P
Procedure
d iis th
the same as b
before
f

Five steps:
Step 1: Determine null and alternative hypothesis
Step 2: Verify conditions and if they are met calculate
test statistic
Step 3: Find p p-value
value assuming that the null
hypothesis is true
Stepp 4: Based on the p p-value decide if yyou have a
statistical significant relationship or not.
Step 5: Report your conclusion, based on the problem
Wh t changes
What h here
h
Only the test statistic:
Now we will have the following test statistic:

Sample mean - Null value x 0


t
Standard error s
n
Which is called t-statistic and follows a t distribution
with n-1 degrees of freedom
B careful:
Be f l
The previous slide is correct under two
conditions:
Population standard deviation is unknown
n < 30
If the two conditions are not satisfied then
we are using the normal distribution table
(it is
i the
th same thing
thi we llearned d ffor
confidence intervals)
E
Example
l 1
I want to test if the average body
temperature is different than what is said
to be 98.6.
I randomly take 18 people and I take the
following values: 98.2, 97.8, 99.0, 98.6,
98.2, 97.8, 98.4, 99.7, 98.2, 97.4, 97.6,
98 4 98
98.4, 98.0,
0 99
99.2,2 98
98.6,
6 97
97.1,
1 97
97.2,
2 98
98.5.
5
Test with significance level 0.05
St 1
Step
St 2
Step
St 3
Step
St 4 and
Step d St
Step 5
Diff
Different
t ways
As before we might have two sided tests, like the
one in the example we have seen before, or one
sided tests.
Example 2:
I want to test if the average body temperature is less
than what is said to be 9898.6.
6
I randomly take 18 people and I take the following
values: 98.2, 97.8, 99.0, 98.6, 98.2, 97.8, 98.4, 99.7,
98 2 97
98.2, 97.4,
4 97
97.6,6 98
98.4,
4 98
98.0,
0 99
99.2,
2 98
98.6,
6 97
97.1,
1 97
97.2,
2
98.5.
Test with significance level 0.05
St 1:
Step 1
St 2:
Step 2
St 3:
Step 3
St 4 and
Step d St
Step 5
5:
Th rejection
The j ti region
i approach
h
The p-value is harder to be found for t
distribution compared to how easy it is for
normal distribution.
This is a problem of the construction of
Tables we have in our hands.
So there is another approach to reach
conclusion in hypothesis testing which we
say the rejection region
R j ti region
Rejection i approach
h
Five steps:
Step 1: Determine null and alternative hypothesis
Step 2: Verify conditions and if they are met calculate
test statistic
Step 3: Find the rejection region for the test based on
confidence level
Stepp 4: Based on the rejection
j region
g decide if yyou
have a statistical significant relationship or not.
Step 5: Report your conclusion, based on the problem
How to find rejection region in
Example 1
How to find rejection region in
Example 2
T
Two dependent
d d t samples
l
In the case that we have two dependent
samples
p then we have the p paired t-test.
It has the same steps as in the one
sample case
case. We will see how to deal with
these cases in one example.
d d0
The test statistic in this case is: t
sd
n
E
Example
l 3
I want to test if a pilots ability to perform task is
minimized by alcohol. I take a random sample
of 10 pilots and I make them perform under
normal conditions and under the influence of
alcohol. The difference of the times between
normal conditions and alcohol conditions are:
76, 190, 590, 390, 65, -55, -5, 530, 175, 0
Make
M k thi
this ttestt with
ith significance
i ifi llevell 0
0.01
01 and
d
using the rejection region approach
St 1
Step
St 2
Step
St 3
Step
St 4 and
Step d St
Step 5
T
Two samples
l Independent
I d d t case

Again we have two cases:


Unpooled General case
Pooled case

The test statistic in the unpooled case is


x1 x2 0
t
s12 s22

n1 n2
T
Two samples
l Independent
I d d t case

In the pooled case we have to calculate


first again
g
sp
n1 1 s1 n2 1 s2
2 2

n1 n2 2

And then the test statistic is:


x1 x2 0
t
1 1
sp
n1 n2
E
Example
l 5
We want to test if there is difference on the time
women and men watches TV. On a survey
involving 59 men and 116 women we had that
men had an average of 2.37 and standard deviation
of 1.87
Women had an average of 1.95 and standard
deviation of 1.51
Do the test using significance level 0
0.05
05 and the
general unpooled case.
St 1
Step
St 2
Step
St 3
Step
St 4 and
Step d St
Step 5
E
Example
l 6
We want to test if there is difference on the time
women and men watches TV. On a survey
involving 59 men and 116 women we had that
men had an average of 2.37 and standard deviation
of 1.87
Women had an average of 1.95 and standard
deviation of 1.51
Do the test using significance level 0
0.05
05 and the
pooled case.
St 1
Step
St 2
Step
St 3
Step
St 4 and
Step d5
Relationship between confidence
intervals and hypothesis testing
When we have quantitative data and a
hypothesis
yp test of significance
g level 0.05
then we can reach a conclusion by
creating
g a 95% confidence interval.
Similarly if the test has significance level
0 01 then we can reach conclusion by
0.01
creating a 99% confidence interval.
Relationship between confidence
intervals and hypothesis testing
We can reach conclusion by:
Firstcreating the interval and
Then checking if the null value is in the
confidence interval or not.
E
Example
l 7
Using the case in example 5:
What is the null value?

95% CI is (-0
( 0.14,
14 00.98)
98)

If null value is in the interval we do not


reject the null, if it isnt then we reject it

Vous aimerez peut-être aussi