Stat5 the t test

12
1 The t test The t test

description

 

Transcript of Stat5 the t test

Page 1: Stat5 the t test

11

The t testThe t test

Page 2: Stat5 the t test

22

ApplicationsApplications

To compare the mean of a sample To compare the mean of a sample with population mean.with population mean.

To compare the mean of one sample To compare the mean of one sample with the mean of another independent with the mean of another independent sample.sample.

To compare between the values To compare between the values (readings) of one sample but in 2 (readings) of one sample but in 2 occasions.occasions.

Page 3: Stat5 the t test

33

1.Sample mean and population 1.Sample mean and population meanmean

The general steps of testing hypothesis The general steps of testing hypothesis must be followed.must be followed.

Ho: Sample mean=Population mean.Ho: Sample mean=Population mean. Degrees of freedom = n - 1Degrees of freedom = n - 1

SE

Xt

Page 4: Stat5 the t test

44

ExampleExample

The following data represents hemoglobin The following data represents hemoglobin values in gm/dl for 10 patients:values in gm/dl for 10 patients:

Is the mean value for patients significantly Is the mean value for patients significantly differ from the mean value of general differ from the mean value of general population population

(12 gm/dl) . Evaluate the role of chance.(12 gm/dl) . Evaluate the role of chance.

10.510.5 99 6.56.5 88 1111

77 7.57.5 8.58.5 9.59.5 1212

Page 5: Stat5 the t test

55

SolutionSolution

Mention all steps of testing hypothesis.Mention all steps of testing hypothesis.

Then compare with tabulated value, for 9 df, and 5% level of Then compare with tabulated value, for 9 df, and 5% level of significance. It is = 2.262significance. It is = 2.262

The calculated value>tabulated value.The calculated value>tabulated value.Reject Ho and conclude that there is a statistically significant Reject Ho and conclude that there is a statistically significant

difference between the mean of sample and population difference between the mean of sample and population mean, and this difference is unlikely due to chance.mean, and this difference is unlikely due to chance.

352.5

10

80201.11295.8

t

Page 6: Stat5 the t test

66

Page 7: Stat5 the t test

77

2.Two independent samples2.Two independent samples

The following data represents weight in Kg for The following data represents weight in Kg for 10 males and 12 females.10 males and 12 females.

Males:Males:

Females:Females:

80 75 95 55 60

70 75 72 80 65

60 70 50 85 45 60

80 65 70 62 77 82

Page 8: Stat5 the t test

88

2.Two independent samples, 2.Two independent samples, cont.cont.

Is there a statistically significant difference Is there a statistically significant difference between the mean weight of males and between the mean weight of males and females. Let alpha = 0.01females. Let alpha = 0.01

To solve it follow the steps and use this To solve it follow the steps and use this equation.equation.

)11

(2

)1()1(

2121

222

211

21

nnnn

SnSn

XXt

Page 9: Stat5 the t test

99

ResultsResults

Mean1=72.7 Mean2=67.17Mean1=72.7 Mean2=67.17 Variance1=128.46 Variance2=157.787Variance1=128.46 Variance2=157.787 Df = n1+n2-2=20Df = n1+n2-2=20 t = 1.074t = 1.074 The tabulated t, 2 sides, for alpha 0.01 is The tabulated t, 2 sides, for alpha 0.01 is

2.8452.845 Then accept Ho and conclude that there is no Then accept Ho and conclude that there is no

significant difference between the 2 means. significant difference between the 2 means. This difference may be due to chance.This difference may be due to chance.

P>0.01P>0.01

Page 10: Stat5 the t test

1010

3.One sample in two 3.One sample in two occasionsoccasions

Mention steps of testing hypothesis.Mention steps of testing hypothesis. The df here = n – 1.The df here = n – 1.

n

sdd

t

1

)( 22

n

n

dd

sd

Page 11: Stat5 the t test

1111

Example: Blood pressure of 8 Example: Blood pressure of 8 patients, before & after patients, before & after treatmenttreatmentBP beforeBP before BP afterBP after dd dd22

180180 140140 4040 16001600

200200 145145 5555 30253025

230230 150150 8080 64006400

240240 155155 8585 72257225

170170 120120 5050 25002500

190190 130130 6060 36003600

200200 140140 6060 36003600

165165 130130 3535 12251225

Mean Mean d=465/8=58.125d=465/8=58.125

∑∑d=465d=465 ∑∑dd22=2917=291755

Page 12: Stat5 the t test

1212

Results and conclusionResults and conclusion

t=9.387t=9.387 Tabulated t (df7), with level of Tabulated t (df7), with level of

significance 0.05, two tails, = 2.36significance 0.05, two tails, = 2.36 We reject Ho and conclude that there We reject Ho and conclude that there

is significant difference between BP is significant difference between BP readings before and after treatment.readings before and after treatment.

P<0.05.P<0.05.