Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
15 views

PBH611.3 Lecture 10

Uploaded by

sd.ashif
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

PBH611.3 Lecture 10

Uploaded by

sd.ashif
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 20

Hypothesis testing

Dipak Mitra
Learning objectives
• Any questions from yesterday
• Hypothesis testing for single mean
• Hypothesis test of single standard deviation
• Two sample tests for mean
• Two independent mean
• Paired mean
One sample test for mean with known
population variance
• We have only one observed mean from one group of study sample
• We know the hypothesized population mean and standard deviation
=
(two-tailed)
(One-tailed)
(One-tailed)
• If sample size is reasonably large, we can assume normal distribution of the
test statistic
• Use Z test
• The test-statistic is computed using the formula
Z score=
One sample test for mean with known
population variance
• Mean birthweight in USA is 120 oz. and standard deviation 20 oz.
• Mean birth weight of 100 babies of low SES mothers is 115 oz.
• We would like to test the hypothesis whether mean birth weight of low
SES families is equal to the national average.

• Z statistic= = == -2.5
Find out the critical values and P values in
excel program
• Critical value: =NORM.S.INV(significance level)
• One sided P value: =1-(NORMSDIST(Z statistic))
• Two sided P value: =NORMSDIST(Z statistic) X 2
One sample test for mean with unknown
population variance
• We have only one observed mean from one group of study sample
• We know the population mean but not the standard deviation
• We can use sample standard deviation instead of population SD, but
cannot use normal distribution of the sample means
• Sample standard deviation is not a constant but a random variable
• The test statistic follows a t distribution which has similar properties
of normal distribution with n-1 degree of freedom
The t test-statistic is computed using the formula
tn-1 statistic=
One sample test for mean with unknown
population variance
• Mean birthweight in USA is 120 oz and standard deviation 20 oz
• Mean birth weight of 100 babies of low SES mothers is 115 oz. and
standard deviation 24 oz.
• We would like to test the hypothesis whether mean birth weight of low
SES families is equal to the national average.
One sample test for mean with unknown
population variance
• The test-statistic is computed using the formula
tn-1===-2.083
• The critical values of two-sided test with 99 DF at 5% significance
level are -1.984 and 1.984
• The critical values of one sided test at 5% significance level are 1.66
• The one sided P value is 0.02
• Two sided p value is 0.04
• Decision???
Find out the critical values and P values in
excel program
• Critical value: =T.INV.2T(Significance level, DF)
• One sided P value: =TDIST(t statistic, DF,1)
• Two sided P value: =TDIST(t statistic, DF,2)
Hypothesis test for two independent means
• We have two independent means and

• = OR -=0

• OR -0
Hypothesis tests for μ1 – μ2 with equal variances

Population means, independent samples

σ1 and σ2 known Use a z test statistic


Use s to estimate unknown σ ,
σ1 and σ2 unknown, approximate with a z test
n1 and n2  30 statistic

σ1 and σ2 unknown, Use s to estimate unknown σ ,


n1 or n2 < 30 use a t test statistic and pooled
standard deviation
σ1 and σ2 known

The test statistic for


μ1 – μ2 is:

z
 x 1 
 x 2   μ1  μ 2 
2 2
σ1 σ 2

n1 n 2
σ1 and σ2 unknown, large samples

The test statistic for


μ1 – μ2 is:

z
 x 1 
 x 2   μ1  μ2 
2 2
s s2

1
n1 n2
σ1 and σ2 unknown, small samples
The test statistic for
μ1 – μ2 is:

t
 x 1 
 x 2   μ1  μ 2 
1 1
sp 
n1 n 2
Where t/2 has (n1 + n2 – 2) d.f.,
and
sp 
n1  1s12  n2  1s2 2
n1  n2  2
Pooled sp t Test: Example

Sample-1 Sample-2
Number 21 25
Sample mean 3.27 2.53
Sample SD 1.30 1.16

Assuming equal variances, is there a difference in two means (  = 0.05)?


Calculating the Test Statistic
The test statistic is:

z
x 1 
 x 2  μ1  μ2  3.27  2.53   0
  2.040
1 1 1 1
sp  1.2256 
n1 n2 21 25

sp 
n1  1s12  n2  1s22 
21  11.30 2  25  11.16 2  1.2256
n1  n2  2 21  25  2
Hypothesis tests for μ1 – μ2 with unequal variances
Hypothesis Testing for Paired Samples

The test statistic for d is


Paired
samples
d  μd
n is the number of pairs t
in the paired sample sd
n
n
Where t/2 has n - 1 d.f.  i
(d  d) 2

and sd is: sd  i1


n 1
Paired Samples Example
The following data are means

Person Before data After data Difference di  di


1 6 4 -2 d = n
2 20 6 -14
3 3 2 -1 = -4.2
4 0 0 0
5 4 0 -4
sd 
 i
(d  d) 2

n 1
 5.67
Thanks

You might also like