Stat5 the t test

12
1 The t test The t test

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 with To compare the mean of a sample with population mean.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 must be The general steps of testing hypothesis must be followed.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 values in The following data represents hemoglobin values in gm/dl for 10 patients:gm/dl for 10 patients:

Is the mean value for patients significantly differ Is the mean value for patients significantly differ from the mean value of general population from the mean value of general 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 difference Reject Ho and conclude that there is a statistically significant difference

between the mean of sample and population mean, and this between the mean of sample and population mean, and this difference is unlikely due to chance.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 10 The following data represents weight in Kg for 10 males and 12 females.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, cont.2.Two independent samples, cont.

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

To solve it follow the steps and use this equation.To solve it follow the steps and use this 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 2.845The tabulated t, 2 sides, for alpha 0.01 is 2.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. This significant difference between the 2 means. This difference may be due to chance.difference may be due to chance.

P>0.01P>0.01

Page 10: Stat5 the t test

1010

3.One sample in two occasions3.One sample in two occasions

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 treatmentpatients, before & after treatmentBP beforeBP before BP afterBP after dd dd22

180180 140140 4040 16001600200200 145145 5555 30253025230230 150150 8080 64006400240240 155155 8585 72257225170170 120120 5050 25002500190190 130130 6060 36003600200200 140140 6060 36003600165165 130130 3535 12251225Mean d=465/8=58.125Mean d=465/8=58.125 ∑∑d=465d=465 ∑∑dd22=29175=29175

Page 12: Stat5 the t test

1212

Results and conclusionResults and conclusion

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

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

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

P<0.05.P<0.05.