TOPIC 8_t- TEST latest_afa6f357ab8e8f0828a7b989a3df2d9f

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 80

STATISTICS FOR

SOCIAL SCIENCES

SHMR 2053

TOPIC 8

t-DISTRIBUTION/t-test
t- DISTRIBUTION

This chapter will focus on:

1. Estimation of a Population Mean: Small Sample


(1 Sample)
2. Two Population Means For Small and
Independent Samples
3. Inferences about the Difference Between Two
Population Means for Paired Samples
two-tailed

one-tailed

one-tailed

The importance of ‘critical values’ in the hypothesis testing!


IMPORTANT TERMINOLOGIES
Comparison (Analysis) of Means
t Value and t Distribution / t-statistic
Critical t Value & Rejection Region
Sum of Squares (SS)
Estimated Standard Deviation of the Population
Estimated Standard Error of Mean
Degree of Freedom
One Sample t Test
Independent Samples t Test
Related Samples (Paired Samples) t Test
Introduction to t-test
• The t-test is used to test hypotheses about mean differences
when the population variance is unknown (the usual case).
Closely related to z, the unit normal.
• Usually t-test is when population variance unknown,
whereas z-test is when population variance is known
• For very large samples, the t distribution approaches the z
distribution, but for smaller samples, the t distribution is
flatter
Types of t
• Single sample t-test – we have only 1 group of
sample; want to test the sample mean against a
hypothetical/population mean, by using sample’s
variance
• Independent samples t-test – we have 2 means, 2
groups of samples; no relation between groups, e.g.,
compare the stress between male and female.
• Dependent t-test / paired sample t-test – we have
two means. Either same people in both groups, or
people are related, e.g., husband-wife, left hand-
right hand, hospital patient and visitor.
DEGREE OF FREEDOM (DF)

✓ To find the critical value in this table for any particular


t, you need to know only what we call the "degrees of
freedom" for your particular sample.
✓ Degrees of freedom (df) is a statistical term used to
denote the number of scores within any distribution
that are free to vary without restriction (see Vernoy &
Vernoy p 264 – 265).
✓ The df vary with different types of t tests;

df = n – 1 (single sample t test)


df = (n1 – 1) + (n2 – 1) (independent samples t test)
df = number of pairs – 1 (dependent/paired samples t test)
1. ONE SAMPLE t TEST
Performing hypothesis testing on a single group of sample
Similar test as z test but applied on a small size sample
Can be approximated by z test if n is large enough
The hypothesis test allows researchers to evaluate the
mean difference between known population mean
(variance remains unknown) using the data from a single
sample.
Using 5 steps of hypothesis testing (refer topic 7)

Hypotheses to be tested:
Ho : sample mean is equal to population mean
H1 : sample mean is not equal to population mean
t STATISTIC

where M is sample mean and μ is population mean and


ESTIMATED STANDARD ERROR
AND t STATISTIC

and

where s2 is sample variance and n is sample size


t STATISTIC
Steps in Performing
One Sample t-Test
1. State the hypothesis
2. Find the critical value at selected α.
find df = n – 1
3. Locate t critical value
4. Compute the test statistic/ t-statistic

5. Make a decision
Example 1 (without raw data)

A sample of n = 25 individuals is randomly selected from


population with a mean of µ = 65, and a specific treatment is
administered to the individuals in the sample. After the
treatment, the sample mean is found to be M = 70.
a. If the sample standard deviation is s = 10, check if the
treatment has a significant effect using a two-tail test with α =
0.05 = p<0.05?
b. If the sample standard deviation is s = 20, check if the
treatment has a significant effect using a one-tail test with α =
0.05?
STATISTIC PRODUCED BY MANUAL COMPUTATIONS

Step 1:
Ho : M = μ where
μ : population mean
H1 : M  μ
M : sample mean

Ho : sample mean is equal to population mean


H1 : sample mean is not equal to population mean

Step 2:

1. with α = 0.05 two-tail,


2. df = n-1= 25 – 1 = 24
Step 3:

From the Table t (with α = 0.05 two-tail, df = n-1=24)


tcritical = 2.064
STATISTIC PRODUCED BY MANUAL COMPUTATIONS

Step 4:

1. Using with s = 10 and n = 25 would give

sM = 2

2. Using t with M = 70 and μ = 65 would give


t = 2.5
Step 5:

tcritical = 2.064 tvalue = 2.500

Conclusion: Reject H0 as tvalue lies in the rejection region (i.e.


the treatment has a significant effect)
Interpreting the Results of Inferential Tests Produced by SPSS*

Statistical Significance

Steps in SPSS = Click Analyze - Compare Means - One Sample T- test


In general, if the calculated value of the statistic (e.g. t, F) is relatively large, the
probability or p is small (e.g. 0.05, 0.01, 0.001).
If the p is less than the preset value α level (usually α = 0.05), we can say that the results
are statistically significant or that they are statistically significant at the α = 0.05 level.
We can then reject the H0 of no difference.

Note that using SPSS computer printouts, it is quite easy to determine statistical
significance because the (truncated) actual significance or probability level (p) is printed
so you do not have to look up a critical value in a table. SPSS labels this p value Sig. so all
of the common inferential statistics have a common metric, the signifance level or Sig.
This level is also the probability of a Type I error or the probability of rejecting the H 0
when its is actually true.
Thus, regardless of what specific statistic you use (e.g. t, F), if the Sig. or p is small (less
than your preset α level, which is usually α = 0.05), the finding is statistically significant,
and you can reject the H0

* Leech N L, Barrett K C and Morgan G A (2011)) IBM SPSS for Intermediate Statistics – Use and Interpretation
Interpreting the Results of Inferential Tests Produced by SPSS*

* Leech N L, Barrett K C and Morgan G A (2011)) IBM SPSS for Intermediate Statistics – Use and Interpretation
EXAMPLE 2 (WITH RAW DATA, SPSS-EXECUTABLE):

Dr. Tee has developed a language-training


system that, she claims, significantly increases
the number of new words acquired by infants.
Average children in this part of the world
begin to speak a few basic words by the time
they are 1 year old; by the time they are 2,
average toddlers have a vocabulary of 210
words.
To test her system, Dr. Tee randomly selects 12
sets of parents who are willing to use her
language-training system with their newborn
infants for 2 years. At the end of the 2-year
test period, she tabulates the number of
words in each toddler's vocabulary. The results
are as displayed.
Test the existence of significant increase of Dr.
Tee’s language-training using two-tailed t test
at  = 0.05 (as compared with the
population!)
Ho : The language-training system will make no difference in the
size of a child's vocabulary as measured at age 2 years.

H1 : The language-training system will make difference in the the


size of a child's vocabulary as measured at age 2 years.

or

Ho : M = μ where
μ : population mean
H1 : M  μ M : sample mean
(output test results produced by SPSS)

Variable N Mean Std. Dev. SE Mean

No_Words 12 223.083 29.740 8.585

95% Confidence
Sig. (2- Mean Interval of the
Variable t df Difference
tailed) Difference
Lower Upper

No_Words 1.524 11 0.156 13.083 -5.812 31.979


DRAWING CONCLUSION
Method 1 (based entirely on SPSS output)

Check the significant value of p ; Reject H0 if p < 

tcritical at α = 0.05 (2-tailed)

tvalue associated with p = 0.156 (i.e. p > α)

Conclusion: Fail to reject H0 as p > 0.05 (i.e. tvalue does not lie in
the rejection region)
Method 2 (alternative, manual approach)

From the Table t (with α = 0.05 two-tail, df =


11)
tcritical = 2.201

tcritical = 2.201

t value = 1.524

Conclusion: Fail to reject H0 as tvalue does not lie in the rejection


region
CHECKING THE EFFECT SIZE
Effect size measures either the sizes of associations or the sizes of differences.

M–μ Using PCT of variance


Cohen’s d =
SM accounted for
where
μ is population mean
M is sample mean
SM is sample std deviation
to give

to give r2 = 2.32/2.32+11
= 0.174 (or about 17.4%)
Cohen’s d = 13.083/29.74 =
0.44
Summary of Methods in Making a Decision

Check the significant value of


Method 1
p ; Reject H0 if p < 

Check the value of t ; Reject


Ho if t falls in the rejection
Method 2
region (refer to tc.v identified
from the Table t)
2. INDEPENDENT SAMPLES t TEST
THE GENERAL IDEA

Note that most psychological research is not designed in such a way


that the mean of one sample is compared to the population mean.
In practice, most experimenters like to use control groups in their
research. Often control groups are used as substitutes for population
values.
For example, in Dr. Tee's vocabulary-learning experiment, we could
have compared the 12 infants in the experimental group to a similar
control group that did not go through the language-training
program. Then, instead of comparing the mean of the research
sample to the mean of the population, we could have compared the
mean of the research sample to the mean of the control sample.
This is normally done by computing the difference between the two
means and then comparing this difference to the mean of the
sampling distribution of differences between means.
If there are two independent samples from populations that have different
means, 1 and 2 , with population 1 being the control population and population
2 being the research population, then the distribution of differences between the
sample means should have a mean equal to the difference between the two
population means:
1- 2
Thus, when we are comparing two independent samples,

Ho = The two samples derived from populations with equal


means (i.e. 1- 2 = 0)
H1 = The two samples derived from populations with
unequal means (i.e. 1- 2  0)

We can use a independent samples t test to test these hypotheses. Note


that in this case, the score we are testing is the difference between the
two sample means
μ1 μ2

M1 M2
Steps in Performing Independent-Sample t-Test
(Manual)
Step 1:
Ho: µ1 = µ2
H1 : µ 1 µ 2
Step 2:
Find the critical value of t with at α level (e.g. α = 0.05 two-tail).
Find the degree of freedom df = (n1 – 1) + (n2 -1)

Step 3:
Locate critical value of t (if calculate manually)

Step 4:

where:
M1, s1p and n1 are mean, standard error and sample size of sample 1 respectively
M2, s2p and n2 are mean, standard error and sample size of sample 2 respectively
μ1 and μ2 are means of Population 1 and Population 2 respectively

Step 5: Make a decision


STEPS TO COMPUTE t STATISTIC FOR INDEPENDENT
SAMPLE
Experimental Group Control Group
Squared
Deviation Deviation Squared
deviation
Score from Score from deviation from
from Mean
Mean Mean Mean (SS)
(SS)

Find Variance Find Variance =


Find Mean = Find Mean =
= SS/(n-1) SS/(n-1)
(Total Score) / n (Total Score)/n
(V1) (V2)

Find Standard Error = =

Find t Statistic = / Standard Error =


Example: (Refer to Dr. Tee’s language-training experiment discussed
earlier)
Suppose that instead of having
us compare the sample mean to
the population mean, Dr. Tee
asks us to compare her
experimental group to a control
group of 12 similar children who
did not receive language
training (refer to data).
Test the existence of significant
increase of Dr. Tee’s language-
training between the
experimental and control
groups using one-tailed t test at
 = 0.05
The Test Results (generated by SPSS):

Steps in SPSS = Click Analyze - Compare Means - Independent


Samples T- test

Conclusion: Reject H0 as p < 0.05 (i.e. tvalue lies in the


rejection region)
CHECKING THE EFFECT SIZE

Using PCT of variance


accounted for

= 0.966
to give
r2 = 0.189 (or about 18.9%)
Some Guides:

Cohen’s d:
1. Cohen’s d = 0.2 ( small effect)
2. Cohen’s d = 0.5 ( medium effect)
3. Cohen’s d = 0.8 ( large effect)

PCT of Variance Accounted for:

1. r2 = 0.01 (small effect)


2. r2 = 0.09 (medium effect)
3. r2 = 0.25 (large effect)
t-TEST FOR INDEPENDENT SAMPLE
example worked-out problem

A researcher randomly assign 13 individuals to receive a new experimental procedure


for mental health improvement and 15 individuals to a control condition. At the end of
the study, the mental health score for all 28 individuals were measured. The
experimental group provide a better score with mean 4.5 (consider using 5-point Likert
Scale) and standard deviation of 0.55. The control group which receive no treatment
provide slightly lower score with mean 4.0 and standard deviation of 0.88. Carry out a t
test to compare the means between these two groups of individuals using the 0.05
level of significance with two-tailed. Use five steps of hypothesis testing and sketch the
distribution involved.

Refer to steps for computing t statistic for independent sample.


STATISTIC PRODUCED BY MANUAL COMPUTATIONS

Step 1:
Ho : M1 = M2 where
M1 : experimental group’s mean
H1 : M1  M2
M2 : control group’s mean

Ho : sample mean of experimental group equal to


sample mean of control group
H1 : sample mean of experimental group is not equal to
sample mean of control group
Step 2:

1. with α = 0.05 two-tail,


2. df = (n1-1) + (n2-1) = (13-1)+(15-1) = 26
Step 3:

From the Table t (with α = 0.05 two-tail, df = 26)


tcritical = 2.056
STATISTIC PRODUCED BY MANUAL COMPUTATIONS

Strong note: Simplified formula of


Step 4: M1=4.5, S1=0.55; M2=4.0, S2=0.88 variance in which Std Dev =
√variance, therefore variance =
n=13, n=15, SS1=3.63, SS2=10.84 (std dev)2 and SS = variance x df

1. Find Sample pool variance,


= 14.47/26 = 0.557

2. Find Standard error,

s(M1-M2) = √0.043 + 0.037 = 0.283

3. Find, t =
s(M1-M2)
t = 0.5/0.283 = 1.77
Step 5:

tvalue = 1.77 associated with p>0.05 tcritical = 2.056 at p<0.05 (2-tailed)

Conclusion: Fail to reject H0 as tvalue did not lies in the rejection


region (i.e. the treatment has no significant effect)
t-TEST FOR INDEPENDENT SAMPLE
example worked-out problem
A researcher randomly assign 5 individuals to receive a new experimental procedure
for mental health improvement and 5 individuals to a control condition. At the end of
the study, the mental health score for all 28 individuals were measured. The
experimental group provide a score of 7,6,9,7,6. The control group which receive no
treatment provide slightly lower score with 5,2,4,3,6. Carry out a t test to compare the
means between these two groups of individuals using the 0.05 level of significance
with two-tailed. Use five steps of hypothesis testing and sketch the distribution
involved.
X1 (exp) X1-M1 (X1-M1)2 X2 (cntrl) X2-M2 (X2-M2)2
7 0 0 5 1 1
6 -1 1 2 -2 4
9 2 4 4 0 0
7 0 0 3 -1 1
6 -1 1 6 2 4
M1=7 SS1=6 M2=4 SS2=10
STATISTIC PRODUCED BY MANUAL COMPUTATIONS

Step 1:
Ho : M1 = M2 where
M1 : experimental group’s mean
H1 : M1  M2
M2 : control group’s mean

Ho : sample mean of experimental group equal to


sample mean of control group
H1 : sample mean of experimental group is not equal to
sample mean of control group
Step 2:

1. with α = 0.05 two-tail,


2. df = (n1-1) + (n2-1) = (5-1)+(5-1) = 8
Step 3:

From the Table t (with α = 0.05, two-tail, df = 8)


tcritical = 2.306
STATISTIC PRODUCED BY MANUAL COMPUTATIONS

Step 4:

1. Find Sample pool variance, = 6+10 = 2


= (5-1)+(5-1)

2. Find Standard error,

s(M1-M2) = √0.8 = 0.894

3. Find, t =
s(M1-M2)
t = 3/0.894 = 3.36
Step 5:

tvalue = 3.36 associated with p<0.05

tcritical = 2.306 at p<0.05 (2-tailed)

Conclusion: Reject H0 as tvalue lies in the rejection region (i.e.


the treatment has a significant effect towards the
samples)
CHECKING THE EFFECT SIZE

Using PCT of variance


accounted for

= 2(3.36)/2.824
= 2.38 to give
r2 = 11.29/19.29= 0.59 (or
about 59%)
3. RELATED (PAIRED) SAMPLES t TEST
THE GENERAL IDEA

The related samples (or correlated samples ) hypothesis test


allows researchers to evaluate the mean difference between
two treatment conditions using the data from a single sample
(called repeated measures design).
In a repeated-measures design, a single group of individuals
is obtained and each individual is measured in both of the
treatment conditions being compared. Thus, the data consist
of two scores for each individual.
The related samples t statistic allows researchers to test a
hypothesis about the population mean difference between
two treatment conditions using sample data from a repeated-
measures research study. (i.e; pre and post test, procedure 1
and procedure 2, etc.)
The related samples t test can also be used for a similar
design, called a matched-subjects design, in which
each individual in one treatment is matched one-to-
one with a corresponding individual in the second
treatment (commonly)
The major difference between a t test for independent
samples and a t test for related samples is that in the
latter, the correlation between the samples can be used
to reduce the size of the standard error of the difference
between the sample means.
Notes:
Reducing the standard error of the difference can be a real advantage because the
smaller the standard error of the difference, the larger the t.
In this situation it is possible to compute a difference
score for each individual:
difference score = D = X2 – X1
where X1 is the person’s score in the first treatment and X2 is
the score in the second treatment.
or
where X1 is the person’s score in the pre-test (before
treatment) and X2 is the score in the post-test (after
treatment).
A sample of n = 4 people is
selected from a population. Each
individual is measured twice, once
in Treatment I and once in
Treatment II, and a difference
score D is computed for each
individual.
This sample of difference scores is
intended to represent a population
(with unknown mean of difference
scores).
The null hypothesis states that for
the general population there is no
consistent or systematic difference
between the two treatments, so
the population mean difference is
μD = 0.
NULL HYPOTHESIS TO BE TESTED
The sample of difference scores is used to test hypotheses
about the population of difference scores. The null
hypothesis states that the population of difference scores
has a mean of zero,

H0: μD = 0
or
H0 : 1 = 2
where
μD = 1 - 2 is population mean difference,
1 and 2 are the means for the first and second population
respectively
NULL HYPOTHESIS TO BE TESTED

• In words, the null hypothesis says that there is no


consistent or systematic difference between the two
treatment conditions.
Note that the null hypothesis does not say that each
individual will have a difference score equal to zero.
Some individuals will show a positive change from one
treatment to the other, and some will show a negative
change.
EFFECT SIZE

• Effect size for the related samples t test is


measured in the same way that we measured
effect size for the single sample t and the
independent samples t.
Specifically, you can compute an estimate of
Cohen’s d (simply estimated d) to obtain a
standardized measure of the mean difference, or
you can compute r2 to obtain a measure of the
percentage of variance accounted for by the
treatment effect.
STEPS IN PERFORMING RELATED SAMPLES
t TEST

2. Find the critical value of t at α level (e.g. α = 0.05


two-tail).
3. Find the degree of freedom df = n-1 and t critical.
4. Next,

where s is the sample standard deviation


SS the sum of squares

5. Make a decision
RELATED SAMPLES t TEST
EXAMPLE
A major oil company would like to improve its tarnished image following a
large oil spill. Its marketing department develops a short television
commercial and tests it on a sample of n = 7 participants. People’s attitudes
about the company are measured with a short questionnaire, both before
and after the commercial. Check if the commercial made significant change
of attitudes towards the company image at α = 0.05

Person X1 (Before) X2 (After)


A 15 15
B 11 13
C 10 18
D 11 12
E 14 16
F 10 10
G 11 19
Ho : There is no difference of attitudes towards
company’s image (i.e. the mean difference is
zero)
H1 : There is a change of attitudes towards
company’s image (i.e. there is a mean
change in attitudes)
or
H0 : D = 0
H1 : D  0

Set α level at α = 0.05 (two-tailed)


The Test Results (generated by SPSS)

Steps in SPSS = Click Analyze - Compare Means - Paired


Samples T- test

Conclusion: Fail to reject H0 as p (0.065) > 0.05


STEPS TO COMPUTE t STATISTIC FOR DEPENDENT
SAMPLE
SCORE DIFFERENCE DEVIATION
SQUARED
SUBJECT (After – (Difference –
Before After DEVIATION
Before) Mean)

Fill in the table, and then:

Find Mean = Total Difference / n

Find Variance = Total Squared Deviation / n-1

Find Standard Error = Sqrt( Variance/n)

Find t Statistic = Mean / Standard Error


MANUAL CALCULATION

Step 1
X1 X2 D (D- (D-
MD) MD)2

Step 2

MD = SS =
D
Step 3
MANUAL CALCULATION
Step 4

Step 5
t-TEST FOR DEPENDENT SAMPLE
example worked-out problem

X1 X2 D (D-MD) (D-MD)2
36
20 30 10 6
256
30 50 20 16
196
20 10 -10 -14
196
40 30 -10 -14
36
30 40 10 6
MD = 4 SS = 720
D
STEPS IN PERFORMING RELATED SAMPLES
t TEST

2. α = 0.05, two-tail, df=5-1=4.


3. Find the t critical = +2.776
4. Next, S2 = SS/ (n-1) = 720/4 = 180
SMD = √180/5 =√36 = 6
tvalue/statistic = 4/6 = 0.67
5. Make a decision = fail to reject null / accept null
hypothesis/ the experiment procedure did not have a
significant effect on the samples.
t-TEST FOR DEPENDENT SAMPLE
solution
Null hypothesis – Mean change score of population 1 is the same as Population 2
Research Hypothesis - Mean change score of population 1 is different from Population 2
CHECKING THE EFFECT SIZE

MD
estimated d = Using PCT of variance
S accounted for
where MD is the sample mean
difference and s is sample
standard deviation

to give to give
r2 = 0.46 (or about 46%)
estimated d = (3/3.512)
= 0.85
SUMMARY

Flowchart that help us in determining which of the three t tests to


use
SUMMARY
t-TEST FOR SINGLE & DEPENDENT SAMPLE
t-TEST FOR INDEPENDENT SAMPLE

t =

OR
CALCULATION FOR EFFECT SIZE
FROM THE SPSS OUTPUT
d = 0.036 / 0.169
= 0.213
d = 1.88 / 1.03
= 1.825
d = 2 x 0.651 / √18
= 0.307
TABLE t
REFERENCES

Aron, A., Aron, E., & Coups, E. (2014). Statistics for Psychology.
Harlow, England: Pearson Education Limited

https://allpsych.com/researchmethods/

Gravetter F J & Wallnau L B. (2013)


Preparing your DATA
1. How to import EXCEL from GF to SPSS
https://www.youtube.com/watch?v=fKqMtDDmVZA
Control c (copy), control v (paste in your spss)

2. Conduct Normality Test by Dr Irza


https://www.youtube.com/watch?v=RlkuR2Ep740&fe
ature=youtu.be

3. Conduct Reliability Test by Dr Irza


https://www.youtube.com/watch?v=zv5IEsAJr6w&fea
ture=youtu.be
Preparing your DATA
4. Descriptive Analysis by Dr Irza
https://www.youtube.com/watch?v=P9mV3PiK_2U&f
eature=youtu.be

5. T-Test by Dr Irza
https://www.youtube.com/watch?v=5luPXEw7eqM&f
eature=youtu.be

You might also like