Upload
jeffry-grant
View
217
Download
1
Tags:
Embed Size (px)
Citation preview
Comparing means
Norhafizah Ab Manan
After class, you should
• Understand independent t test, paired t test and ANOVA
• Know how to calculate the t statistics• Find the t tabulated from t
distribution table
Comparing two means
• How can we get a mean?• What data?- categorical or
numerical?
Independent t test
• Is cholesterol level differ between male and female students?
• What is the null hypothesis for this study?
male female
Independent t test
• Measure –Compare two means
• Assumptions 1. In each group of the dependent
variables, the distribution is normal
2.Random sample• How to test the assumption?
Steps in hypothesis testing
1. Define the null and alternative hypothesis Ho= The population means in two groups
are equal Ha= The population means in the groups are
not equal
2. Calculate the t statistics/ t calculated3. Compare the t statistics to the value from
t-distribution4. Interpret the results
Example;
• A researcher interested to compare cholesterol level between male and female students. There are 12 males and 7 females. The data was:
Group Sample size
Mean (mmol/L)
SD (mmol/L)
Male 12 6.192 0.3919
Female 7 5.414 0.6492
1. Define null and alternative hypothesis.
• Ho= The cholesterol means in male and female students are equal
• Ha= The cholesterol means in male and female students are not equal
2. Calculate the t statistics
2. Calculate the t statistics
Group Sample size
Mean (mmol/L
)
Variance (mmol/L
)
Male 12 6.192 0.3919
Female 7 5.414 0.6492
= 0.483
2. Calculate the t statistics
Group Sample size
Mean (mmol/L
)
SD (mmol/L
)
Male 12 6.192 0.3919
Female 7 5.414 0.6492
= 0.778/0.3305=2.36
3. Compare the t statistics to the value from t-distribution
• If t calculated > t tabulated (from table)- we reject the null hypothesis• If t calculated < t tabulated (from table) –we fail to reject the null hypothesis
One tailed
•Right-tailed •Sign of Ha is > •Key word: More than
•Left-tailed •Sign of Ha is < •Key word: Less than
Rejection area
Two tailed
• The sign of HA is ≠
• Key word: no different
• Rejection area
3. Compare the t statistics to the value from t-distribution
• Find the t tabulated from t distribution table
• =2.45 (from table) with alpha error= 95%, Upper tailed = 2.5%.
• Degree of freedom= the smaller of (n1-1) or (n2-1)
• 6?• T statistics=2.36
2,45-2,45
0
4. Interpret the results
• The t calculated value is in the critical region
• Reject the null hypothesis• There is different of cholesterol
between gender
Paired t test
• Measure –Compare two dependent means (before and after)
• Assumptions 1.Distribution of the different is
normal2.Random sample
• How to test the assumption?
Example
• A researcher interested to determine the effectiveness of an intervention towards BP. The BP of the subjects were measured twice; before and after the intervention.
Measure Sample size
Mean of d
Sd
Pre-interV
15 6.4 8.48
1. Define null and alternative hypothesis.
• Ho= there is no different of BP before and after the intervention
• Ha= there is a different before and after the intervention
2. Calculate the t statistics
• The formula for t statistics:
t=test statisticsḋ= mean of the differenceSd =Sd of the differencen= sample size
2. Calculate the t statistics
Measure Sample size
Mean of d
Sd
Pre-interV
15 6.4 8.458
15
458.804.6
t=2.930
Note: A hypothesized mean difference (μd) can be any specified value. The most common value specified is zero.
3. Compare the t statistics to the value from t-distribution
• T calculated= 2.930• T tabulated with df (14) and
alpha(0.05)= 2.14
4. Interpret the results
• The t calculated value is in the critical region
• Reject the null hypothesis• There is a different between before
and after the intervention
ANOVA
• To compare means between more than two groups
• Variable:– Independent variable: Categorical– Dependent variable: Numerical
• Assumptions:– Data is normal distributed– Equal variance
Examples
• To determine whether BMI is different between age groups or not
• To study the effect of 3 different types of anti hypertensive drug on 120 patients.
• To compare the mean different of IQ scores among 3 classes
References• Basic Biostatistics statistics for public health
practice. 2008. B Burt Genstman. Jones and Batlett Publisher Inc.
• Medical statistics at a glance. 3rd Edition. 2009. Aviva Petrie & Caroline Sabin. Wiley-Blackwell.