26
Comparing means Norhafizah Ab Manan

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

Embed Size (px)

Citation preview

Page 1: 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

Comparing means

Norhafizah Ab Manan

Page 2: 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

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

Page 3: 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

Comparing two means

• How can we get a mean?• What data?- categorical or

numerical?

Page 4: 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

Independent t test

• Is cholesterol level differ between male and female students?

• What is the null hypothesis for this study?

male female

Page 5: 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

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?

Page 6: 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

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

Page 7: 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

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

Page 8: 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

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

Page 9: 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

2. Calculate the t statistics

Page 10: 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

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

Page 11: 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

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

Page 12: 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

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

Page 13: 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

One tailed

•Right-tailed •Sign of Ha is > •Key word: More than

•Left-tailed •Sign of Ha is < •Key word: Less than

Rejection area

Page 14: 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

Two tailed

• The sign of HA is ≠

• Key word: no different

• Rejection area

Page 15: 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

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

Page 16: 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

4. Interpret the results

• The t calculated value is in the critical region

• Reject the null hypothesis• There is different of cholesterol

between gender

Page 17: 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

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?

Page 18: 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

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

Page 19: 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

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

Page 20: 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

2. Calculate the t statistics

• The formula for t statistics:

t=test statisticsḋ= mean of the differenceSd =Sd of the differencen= sample size

Page 21: 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

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.

Page 22: 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

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

Page 23: 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

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

Page 24: 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

ANOVA

• To compare means between more than two groups

• Variable:– Independent variable: Categorical– Dependent variable: Numerical

• Assumptions:– Data is normal distributed– Equal variance

Page 25: 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

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

Page 26: 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

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.