0% found this document useful (0 votes)
446 views44 pages

T Test

The medication has a significant positive effect on intelligence. The observed difference between the sample mean and population mean is very unlikely to be due to chance or sampling error.

Uploaded by

ratna kd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
446 views44 pages

T Test

The medication has a significant positive effect on intelligence. The observed difference between the sample mean and population mean is very unlikely to be due to chance or sampling error.

Uploaded by

ratna kd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 44

T-tests

Statistics
T-test
The Student’s t-test is a statistical test that
compares the mean and standard deviation of
two samples to see if there is a significant
difference between them.

In an experiment, a t-test might be used to


calculate whether or not differences seen
between the control and each experimental
group are a factor of the manipulated variable
or simply the result of chance.
T-test
The T-test is a test of a statistical significant difference
between two groups.

• A "significant difference" means that the results


that are seen are most likely not due to chance or
sampling error.
• In any experiment or observation that involves
sampling from a population, there is always the
possibility that an observed effect would have
occurred due to sampling error alone.
• But if result is "significant”, then the investigator
may conclude that the observed effect actually
reflects the characteristics of the population rather
than just sampling error or chance.
T-test
The T-test is a test of a statistical significant difference
between two groups.

TYPES

1 Sample Independent Dependent


t-test Samples t test Samples t-test

In all cases TWO group


means are being compared
Types of T-tests
1. One-sample t-test
– Compares mean of a single sample to a
known population mean

Example
A group of 100 people took an IQ test. Are they
different from the population average? Do they
have above average IQ?
Types of T-tests
2. Independent samples t-test
– Compares the mean scores of two different
groups of subjects
– Also known as 2-samples t test

Example
Are Science scores different between students
with high fitness and low fitness?
Types of T-tests
3. Dependent samples t-test
– Compares the mean scores for the same
group of subjects on two different
occasions
– also known as paired samples t test or
repeated measures t-test

Example
Is the group different before and after a
treatment?
EXERCISE
Determine which type of t-test is necessary for each
given hypothesis / study.
EXERCISE
Determine which type of t-test is necessary for each
given hypothesis / study.

2. People who are allowed to sleep for only


four hours will score significantly lower than
people who are allowed to sleep for eight
hours on a cognitive skills test.

3. Junior varsity javelin toss players


significantly improve their throwing distance
between the pre and post season.
EXERCISE
Determine which type of t-test is necessary for each
given hypothesis / study.

4.
EXERCISE
Determine which type of t-test is necessary for each
given hypothesis.

5. Does ginkgo supplements improve memory?


The 104 participants who were assigned to the
treatment group took 40 mg of ginkgo 3 times a
day for 6 weeks. The 115 participants assigned
to the control group took a placebo pill 3 times a
day for 6 weeks. At the end of 6 weeks, the
Wechsler Memory Scale was administered.
EXERCISE
Determine which type of t-test is necessary for each
given hypothesis.

6. There is a significant increase in the pH


level of Taal Lake from dusk until dawn.

7. Batteries made by Duracell exhibit a


significant longer life than batteries made by
Eveready.
EXERCISE
Determine which type of t-test is necessary for each
given hypothesis / study.

8. A study on the resting systolic blood pressure is


being conducted. Twenty first year resident female
doctors are drawn at random from one area. Their
resting systolic blood pressures is measured using
an electronic sphygmomanometer. From previous
large studies of women drawn at random from the
healthy general public, a resting systolic blood
pressure of 120 mm Hg was predicted as the
population mean for the relevant age group.
T-test
The T-test is a test of a statistical significant difference
between two groups.

TYPES

1 Sample Independent Dependent


t-test Samples t test Samples t-test

In all cases TWO group


means are being compared
Sample Problem
1 sample t test
In the population, the average IQ is 100. A team of scientists wants to test a
new medication to see if it has either a positive or negative effect on
intelligence, or no effect at all. A sample of 30 participants who have taken
the medication has a mean of 140 with a standard deviation of 20. Did the
medication affect intelligence? Alpha = 0.05

1. Define Null and Alternative Hypothesis


2. State alpha
3. Calculate Degrees of Freedom
4. State Decision rule
5. Calculate Test Statistic
6. State results
7. State Conclusion
Sample Problem
1 sample t test
In the population, the average IQ is 100. A team of scientists wants to test a new medication to
see if it has either a positive or negative effect on intelligence, or no effect at all. A sample of
30 participants who have taken the medication has a mean of 140 with a standard deviation of
20. Did the medication affect intelligence? Alpha = 0.05
1. Define Null and Alternative Hypothesis

H o ;   100 H A ;   100
Null Hypothesis Alternative Hypothesis

The medication has no The medication has significant


significant effect on intelligence, effect on intelligence, the observed
the difference we see in the two differences are most likely not due
means may be due to chance to chance or sampling error.
and sampling error.
Sample Problem
1 sample t test
In the population, the average IQ is 100. A team of scientists wants to test a
new medication to see if it has either a positive or negative effect on
intelligence, or no effect at all. A sample of 30 participants who have taken
the medication has a mean of 140 with a standard deviation of 20. Did the
medication affect intelligence? Alpha = 0.05

2. State alpha / significance level (standard “p-value” of 0.05)


- the probability of making the WRONG conclusion
- means that five times out of a hundred you would find a
statistically significant difference between the means even

  0.05
if there was none ​
Sample Problem
1 sample t test
In the population, the average IQ is 100. A team of scientists wants to test a
new medication to see if it has either a positive or negative effect on
intelligence, or no effect at all. A sample of 30 participants who have taken
the medication has a mean of 140 with a standard deviation of 20. Did the
medication affect intelligence? Alpha = 0.05

3. Calculate Degrees of Freedom

n – 1 = 30 – 1 = 29
n – number of sample
Degrees of freedom – 29 ; this has an effect on what
critical value is to be used.
Sample Problem
1 sample t test
In the population, the average IQ is 100. A team of scientists wants to test a
new medication to see if it has either a positive or negative effect on
intelligence, or no effect at all. A sample of 30 participants who have taken
the medication has a mean of 140 with a standard deviation of 20. Did the
medication affect intelligence? Alpha = 0.05
4. State Decision rule

- In the T-table (2-tailed test), find the


intersection of df = 29 and α = 0.05.
2.045
DECISION RULE: If t is less than -2.045
or greater than 2.045, reject the null
hypothesis.
- 2.045 0 2.045
Sample Problem
1 sample t test

x   140 100
t  20
s
30
n
Sample Problem
1 sample t test
In the population, the average IQ is 100. A team of scientists wants to test a new
medication to see if it has either a positive or negative effect on intelligence, or no
effect at all. A sample of 30 participants who have taken the medication has a mean
of 140 with a standard deviation of 20. Did the medication affect intelligence?
Alpha = 0.05

6. State results
If t is less than -2.045 or greater than 2.045, reject the null
hypothesis.
t = 10.96
DECISION: Reject Ho
The medication has no significant effect on intelligence,
the difference we see in the two means may be due to
chance and sampling error. - REJECTED
Sample Problem
1 sample t test
In the population, the average IQ is 100. A team of scientists wants to test a new
medication to see if it has either a positive or negative effect on intelligence, or no
effect at all. A sample of 30 participants who have taken the medication has a mean
of 140 with a standard deviation of 20. Did the medication affect intelligence?
Alpha = 0.05

7. State Conclusion
DECISION: Reject Ho
The medication has no significant effect on intelligence,
the difference we see in the two means may be due to chance
and sampling error. – REJECTED

Medication significantly affected intelligence,


t = 10.96, p < 0.05
Sample Problem
Independent Samples t test
A statistics teacher wants to compare his two classes
to see if they performed any differently on the tests he
gave that semester. Class A had 25 students with an
average score of 70, standard deviation 15. Class B
had 20 with an average score of 74, standard
deviation 25. Using alpha 0.05, did these two classes
perform differently on the tests?
CLASS N x SD
A 25 70 15
B 20 74 25
Sample Problem
Independent Samples t test
A statistics teacher wants to compare his two classes to see if they
performed any differently on the tests he gave that semester. Class A had 25
students with an average score of 70, standard deviation 15. Class B had 20
with an average score of 74, standard deviation 25. Using alpha 0.05, did
these two classes perform differently on the tests?
1. Define Null and Alternative Hypothesis
2. State Alpha
3. Calculate Degrees of Freedom
4. State Decision Rule
Cal 5. Calculate Test Statistic
6. State Results
7. State Conclusion
Sample Problem
Independent Samples t test
A statistics teacher wants to compare his two classes to see if they performed any
differently on the tests he gave that semester. Class A had 25 students with an
average score of 70, standard deviation 15. Class B had 20 with an average score of
74, standard deviation 25. Using alpha 0.05, did these two classes perform
differently on the tests?
1. Define Null and Alternative Hypothesis

H o ;  A  B H A ;  A  B
Null Hypothesis Alternative Hypothesis

The tests scores of Class A and Class The tests scores of Class A and
B are of no significant difference, the Class B are of significant
difference we see in the two difference, the observed
means may be due to chance and differences are most likely not due
sampling error. to chance or sampling error.
Sample Problem
Independent Samples t test
A statistics teacher wants to compare his two classes to see if they performed any
differently on the tests he gave that semester. Class A had 25 students with an
average score of 70, standard deviation 15. Class B had 20 with an average score of
74, standard deviation 25. Using alpha 0.05, did these two classes perform
differently on the tests?

2. State alpha / significance level (standard “p-value” of 0.05)


- the probability of making the WRONG conclusion In
- means that five times out of a hundred you would find a
statistically significant difference between the means even

  0.05
if there was none ​
Sample Problem
Independent Samples t test
A statistics teacher wants to compare his two classes to see if they performed any
differently on the tests he gave that semester. Class A had 25 students with an
average score of 70, standard deviation 15. Class B had 20 with an average score of
74, standard deviation 25. Using alpha 0.05, did these two classes perform
differently on the tests?
3. Calculate Degrees of Freedom
Degrees of Freedom for Independent Samples T test

df  (n1  1)  (n2  1)
df  (25  1)  (20  1)
df  43
Sample Problem
Independent Samples t test
A statistics teacher wants to compare his two classes to see if they
performed any differently on the tests he gave that semester. Class A had
25 students with an average score of 70, standard deviation 15. Class B
had 20 with an average score of 74, standard deviation 25. Using alpha
0.05, did these two classes perform differently on the tests?
4. State Decision rule

- In the T-table (2-tailed test), find the


intersection of df = 43 and α = 0.05.
2.0167
DECISION RULE: If t is less than -2.0167
or greater than 2.0167, reject the null
hypothesis.
- 2.0167 0 2.0167
Sample Problem
Independent Samples t test
A statistics teacher wants to compare his two classes to see if they performed any
differently on the tests he gave that semester. Class A had 25 students with an
average score of 70, standard deviation 15. Class B had 20 with an average score of
74, standard deviation 25. Using alpha 0.05, did these two classes perform
differently on the tests?
5. Calculate Test Statistic

t
 x1  x2   1   2  Since we are testing the null
hypothesis where μ1 = μ2,
2 2 and in the null hypothesis
s s
p
 p
μ1 – μ2 = 0, we leave it out
n1 n2 of the equation.
Sample Problem
Independent Samples t test
A statistics teacher wants to compare his two classes to see if they performed any
differently on the tests he gave that semester. Class A had 25 students with an
average score of 70, standard deviation 15. Class B had 20 with an average score of
74, standard deviation 25. Using alpha 0.05, did these two classes perform
differently on the tests?
SS1  SS2 5400  11875
5. Calculate Test Statistic s 
2
  401 .74
df1  df2
p
24  19
t
x1  x2  SS1  s12 df1   (152 )(24)  5400

SS2  s22 df2   (252 )(19)  11875


2 2
s s
p
 p

n1 n2 t
70  74   0.67
401 .74 401.74

25 20
Sample Problem
Independent Samples t test
A statistics teacher wants to compare his two classes to see if they performed any
differently on the tests he gave that semester. Class A had 25 students with an
average score of 70, standard deviation 15. Class B had 20 with an average score of
74, standard deviation 25. Using alpha 0.05, did these two classes perform
differently on the tests?
6. State Results
DECISION RULE: If t is less than -2.0167 or greater than
2.0167, reject the null hypothesis.
t = - 0.67 ( in between – 2.0167 and 2.0167)
DECISION: Do not reject Ho.
The tests scores of Class A and Class B are of no significant
difference, the difference we see in the two means may be due to
chance and sampling error. - ACCEPT ED
Sample Problem
Independent Samples t test
A statistics teacher wants to compare his two classes to see if they performed any
differently on the tests he gave that semester. Class A had 25 students with an average
score of 70, standard deviation 15. Class B had 20 with an average score of 74,
standard deviation 25. Using alpha 0.05, did these two classes perform differently on
the tests?
6. State Conclusion
DECISION: Do not reject Ho.
The tests scores of Class A and Class B are of no significant
difference, the difference we see in the two means may be due to
chance and sampling error. – ACCEPTED

There was no significant difference between the test


performances of Class A and Class B, t = -0.67, p > 0.05
Sample Problem
Dependent Samples t test
Researchers want to test a new anti- BEFORE AFTER
hunger weight loss pill. They have 10 9 7
people rate their hunger both before 10 6
and after taking the pill. Does the pill 7 5
do anything? Use alpha = 0.05 5 4
7 4
5 6
9 7
6 5
8 5
7 7
Sample Problem
Dependent Samples t test
Researchers want to test a new anti-hunger weight loss pill. They
have 10 people rate their hunger both before and after taking the
pill. Does the pill do anything? Use alpha = 0.05
1. Define Null and Alternative Hypothesis
2. State Alpha
3. Calculate Degrees of Freedom
4. State Decision Rule
5. Calculate Test Statistic
6. State Results
7. State Conclusion
Sample Problem
Dependent Samples t test
Researchers want to test a new anti-hunger weight loss pill. They
have 10 people rate their hunger both before and after taking the
pill. Does the pill do anything? Use alpha = 0.05
1. Define Null and Alternative Hypothesis
H o ; before  after H A ; before  after
Null Hypothesis Alternative Hypothesis
There is no significant difference in There is a significant difference in
the rate of hunger of the samples the rate of hunger of the samples
before and after taking the weight before and after taking the weight
loss pills, the difference we see in loss pills, , the observed differences
the two means may be due to are most likely not due to chance or
chance and sampling error. sampling error.
Sample Problem
Dependent Samples t test
Researchers want to test a new anti-hunger weight loss pill. They
have 10 people rate their hunger both before and after taking the
pill. Does the pill do anything? Use alpha = 0.05

2. State alpha / significance level (standard “p-value” of 0.05)


- the probability of making the WRONG conclusion
- means that five times out of a hundred you would find a
statistically significant difference between the means
even if there was none ​

  0.05
Sample Problem
Dependent Samples t test
Researchers want to test a new anti-hunger weight loss pill. They
have 10 people rate their hunger both before and after taking the
pill. Does the pill do anything? Use alpha = 0.05
3. Calculate Degrees of Freedom

df  N  1
df  10  1 N – total number
of participants
df  9
Sample Problem
Dependent Samples t test
Researchers want to test a new anti-hunger weight loss pill. They
have 10 people rate their hunger both before and after taking the
pill. Does the pill do anything? Use alpha = 0.05
4. State Decision Rule
- In the T-table (2-tailed test), find
the intersection of df = 9 and
α = 0.05.
2.2622
DECISION RULE: If t is less than
2.0167 -2.2622 or greater than 2.0167, reject the
null hypothesis.
- 2.2622 0 2.2622
Sample Problem
Dependent Samples t test
Researchers want to test a new anti-hunger weight loss pill. They
have 10 people rate their hunger both before and after taking the
pill. Does the pill do anything? Use alpha = 0.05
5. Calculate Test Statistic

XD X D  mean of the difference


t sD
sD  SD of the difference
n
n  samples
Sample Problem
Dependent Samples t test
 d
BEFORE AFTER DIFFERENCE d d2


2

d  n
9 7 2 4
2
10 6 4 16
7 5 2 4 sD 
5 4 1 1 n 1
7 4 3 9
5
9
6
7
-1
2
1
4 49 
17 
2

6 5 1 1
sD  10  1.49
8 5 3 9
10  1
7 7 0 0
∑ 17 49
X 1.7 4.9
Sample Problem
Dependent Samples t test
BEFORE AFTER DIFFERENCE D D2
9 7 2 4 XD
10
7
6
5
4
2
16
4
t sD
5 4 1 1 n
7 4 3 9
1.7
t  3.61
5 6 -1 1
9 7 2 4
6 5 1 1 1.49
8 5 3 9 10
7 7 0 0
∑ 17 49
X 1.7 4.9
Sample Problem
Dependent Samples t test
Researchers want to test a new anti-hunger weight loss pill. They have 10
people rate their hunger both before and after taking the pill. Does the pill
do anything? Use alpha = 0.05

6. State Results
DECISION RULE: If t is less than -2.2622 or greater than 2.2622, reject the
null hypothesis.
t = 3.61( exceeded 2.2622)
DECISION: Reject Ho.
There is no significant difference in the rate of hunger of the
samples before and after taking the weight loss pills, the difference
we see in the two means may be due to chance and sampling error.
r. - - REJECTED
Sample Problem
Dependent Samples t test
Researchers want to test a new anti-hunger weight loss pill. They have 10
people rate their hunger both before and after taking the pill. Does the pill
do anything? Use alpha = 0.05

7. State Conclusion
DECISION: Reject Ho.
There is no significant difference in the rate of hunger of the
samples before and after taking the weight loss pills, the difference
we see in the two means may be due to chance and sampling error.
r. - - REJECTED

The anti-hunger weight loss pill significantly


affected hunger, t = 3.61, p < 0.05.
Sources & References:
- http://www.biologyforlife.com/t-test.html
- https://d37djvu3ytnwxt.cloudfront.net/assets/courseware/6a25
170443db247235efea1695a46087/asset-
v1:UTAustinX+UT.7.20x+1T2016+type@asset+block/Chapter
_13.pdf
- http://archive.bio.ed.ac.uk/jdeacon/statistics/tress4a.html
- http://blog.minitab.com/blog/adventures-in-statistics-
2/understanding-t-tests%3A-1-sample%2C-2-sample%2C-
and-paired-t-tests
- http://www.statsdirect.com/help/parametric_methods/single_sa
mple_t.htm
- http://stats.idre.ucla.edu/other/mult-pkg/faq/general/faq-what-
are-the-differences-between-one-tailed-and-two-tailed-tests/

You might also like