T test

180,121 views 14 slides Nov 04, 2013
Slide 1
Slide 1 of 14
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14

About This Presentation

No description available for this slideshow.


Slide Content

11
The t testThe t test
prepared byprepared by
B.saikiranB.saikiran
(12NA1E0036)(12NA1E0036)

IntroductionIntroduction

The t-test is a basic test that is limited to two The t-test is a basic test that is limited to two
groups. For multiple groups, you would have to groups. For multiple groups, you would have to
compare each pair of groups, for example with compare each pair of groups, for example with
three groups there would be three tests (AB, three groups there would be three tests (AB,
AC, BC), whilst with seven groups there would AC, BC), whilst with seven groups there would
need to be 21 tests.need to be 21 tests.

The basic principle is to test the The basic principle is to test the null null
hypothesishypothesis that the means of the two groups  that the means of the two groups
are equal.are equal.


The t-test assumes: The t-test assumes:

A normal distribution (A normal distribution (parametricparametric data) data)

Underlying Underlying variancesvariances are equal (if not, use Welch's test) are equal (if not, use Welch's test)

It is used when there is random assignment and It is used when there is random assignment and
only two sets of measurement to compare.only two sets of measurement to compare.

There are two main types of t-test:There are two main types of t-test:

Independent-measures t-testIndependent-measures t-test: when samples are not : when samples are not
matched.matched.

Matched-pair t-testMatched-pair t-test: When samples appear in pairs (eg. : When samples appear in pairs (eg.
before-and-after).before-and-after).

A single-sample t-test compares a sample against A single-sample t-test compares a sample against
a known figure, for example where measures of a a known figure, for example where measures of a
manufactured item are compared against the manufactured item are compared against the
required standard.required standard.

44
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.

55
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
X
t
-
-
=
m

66
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.599 6.56.588 1111
77 7.57.58.58.59.59.51212

77
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.1
1295.8
-=
-
=t

88

99
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:
8075955560
7075728065
607050854560
806570627782

1010
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
2
22
2
11
21
nnnn
SnSn
XX
t
+
-+
-+-
-
=
-
-

1111
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

1212
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
sd
d
t
-
=
1
)(
2
2
-
-
=
å
å
n
n
d
d
sd

1313
Example: Blood pressure of 8 Example: Blood pressure of 8
patients, before & after treatmentpatients, before & after treatment
BP beforeBP beforeBP afterBP afterdd dd
22
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 d=465/8=58.125Mean d=465/8=58.125 ∑∑d=465d=465 ∑∑dd
22
=29175=29175

1414
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.
Tags