Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

7c T-Test

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 49

Hypothesis Testing

and
The t-test

Dr. Robert Randall


Population Standard Deviation (σ) Unknown
(1) Testing Hypotheses when Population Unknown

When Sigma is Unknown, Not Possible to Calculate Sigma X-bar; the


denominator of the Z-test.

Therefore, we must Estimate Sigma in order to Calculate something analogous to


Sigma X-bar; but how can we estimate Sigma?
(2) Testing Hypotheses when Population Unknown

We estimate Sigma using the Sample Standard Deviation.

But, first we must discuss Biased and Unbiased Estimators.


(3) Testing Hypotheses when Population Unknown

A Biased Estimator is an Estimator in which the Expected Value Does Not Equal
the Population Value.
E(Biased Estimator) ≠ Population Value

An Unbiased Estimator is an Estimator in which the Expected Value Does Equal


the Population Value.
E(Unbiased Estimator) = Population Value
(4) Testing Hypotheses when Population Unknown
Sample Mean is an Unbiased Estimate of Population Mean
Sample Standard Deviation (S) is a Biased Estimate of Population Standard Deviation

This is Because:
E(Largest Score in Sample) < E(Largest Score in Population) AND
E(Smallest Score in Sample) > E(Smallest Score in Population)

Therefore, a Sample tends to NOT INCLUDE the Most Extreme Scores from the
Population.
For example, in the Population, there are Individuals with IQ > 150+ AND
there are Individuals with IQ < 50

However, these Individuals tend to NOT be included in Samples because the


Probability of an IQ this Extreme is So Low.
(5) Testing Hypotheses when Population Unknown

When the Deviations about the Mean are Squared, the Effects of the Missing Extreme
Scores are Magnified.

For example, for an IQ of 102, the Squared Deviation is 22 = 4; however, for an IQ of


200, the Squared Deviation is 1002 = 10,000 and for an IQ of 263 (highest ever
recorded) the Squared Deviation is 1632 = 26,569

Therefore, the Sample Standard Deviation (S) is an Underestimate of the Population


Standard Deviation.

- Therefore, we must correct the Sample Standard Deviation (S) so that it is No


Longer an Underestimate of the Population Standard Deviation.
(6) Testing Hypotheses when Population Unknown

The Correction is Quite Simple.

Also, Because the Bias of the Sample Standard Deviation (S) is Larger for Small
Sample Sizes, the Correction has a larger Effect for Smaller Sample Sizes.

The correction is to Divide the Sum of Squares () by N – 1, rather than N.

Therefore, ; Unbiased Estimate of Population SD

Note the “Hat” over the “S”, we call this statistic “S-Hat”.

Whenever a “Hat” (actually a caret) is over a sample statistic, it means the statistic is
an unbiased estimator.
(7) Testing Hypotheses when Population Unknown
Example 1: N = 2, = 10,000

Therefore,

= = = 100; Unbiased Estimate of Population SD

= = = 70.71; Biased Estimate of Population SD

Note the “Hat” over the “S”, we call this statistic “S-Hat”.

Whenever a “Hat” (actually a caret) is over a sample statistic, it means the statistic is
an unbiased estimator.
(8) Testing Hypotheses when Population Unknown

Example 1: N = 100, = 10,000

Therefore,

= = = 10.05; Unbiased Estimate of Population SD

= = 10.00; Biased Estimate of Population SD

As you can see, the correction has a much smaller effect for larger sample sizes.
However, the bias is also much less for larger sample sizes.
Z-Test
= Sample Mean 𝝁 𝑿 =𝝁 𝑿
X − μX
z= = Population Mean for Distribution
σX of Sample Means.
= Population Standard Deviation for
Distribution of Sample Means. 𝝈 𝑿 = √∑ ¿¿¿¿

t-Test 𝝁 𝑿 =𝝁 𝑿
= Sample Mean
X − μX = Population Mean for Distribution
𝑡= of Sample Means.

𝑿 √
𝑆^
X = Estimate of Population Standard Deviation ^𝑆 = ∑ ¿¿¿ ¿
for Distribution of Sample Means.
(9) Testing Hypotheses when Population Unknown

Therefore,

The only Difference between the t-test (Used when Population SD Unknown)
AND the Z-test (Used when Population SD Known) is that:

is used to Estimate for the t-test because the Population SD is Unknown.

- Whereas is used in the Z-test because the Population SD is Known.


(10) Testing Hypotheses when Population Unknown

Example 1: Assumed the Population Mean Systolic Blood Pressure is 120 Mm Hg;
however, the Population Standard Deviation is Unknown. A researcher tests whether
Biofeedback will significantly lower Systolic Blood Pressure. The researcher selects
10 individuals and has them each complete a 6-month Biofeedback Program in which
each individual practices Biofeedback for 1 hour per day, every day for 6 months.

At the end of the 6-month period, the researcher measures each individual’s Blood
Pressure and calculates the mean for this sample. The sample mean is 110. The
researcher wants to maximize the power of the test. The data are presented on the
next slide
(11) Testing Hypotheses when Population Unknown

BP (X - )
110 0 0 = 4.242
106 -4 16
114 4 16 = 1.3416
112 2 4
108 -2 4 t = = - 7.4536
105 -5 25
115 5 25
104 -6 36
116 6 36
110 0 0
Mean 110
Sum 162
Hypothesis Test for Example 1

(1) Write Hypotheses


Ho: μ = 120 (Population Mean BP if Treatment has No Effect)
H1: μ ≠ 120 (Population Mean BP if Treatment has Effect)
(2) Set Criteria
α = .05 (5% Probability of Making a Type I Error)
(3) Calculate Test Statistic
= 4.242; = 1.3416; t = = -7.4536

(4) Make Decision


Same Decision Rule as Z-test; however, we must learn to look up
Critical t-values in Students t-distribution Table.
(12) Testing Hypotheses when Population Unknown

Degrees of Freedom

In order to find the Critical Values for the t-test, we should briefly discuss Degrees of
Freedom (df). For the t-test (and many statistical tests, the Degrees of Freedom are
N – 1 (The Number of Scores in the Sample Minus One); but why?

Degrees of Freedom are the Number of Numbers that are Free to Vary; meaning that
they are Free to Take on Any Value.

On the Next Slide, I Present an Example.


(13) Testing Hypotheses when Population Unknown
Degrees of Freedom
Let’s say we have 5 Numbers and the Mean of Those 5 Numbers is 100.
Circled Numbers (First N – 1 Numbers) Are Free to Vary Last Number Not Free to Vary

X X X X X X X
309 212 36 19 28 217 171
24 101 47 4 10 103 5
3 82 59 3 19 129 99
57 67 73 61 3 50 127
107 38 285 413 440 1 98
Mean 100 100 100 100 100 100 100

Note: In each of the examples above, the First 4 Numbers (N – 1) are “Free to Vary”
Meaning they can take on Any Values; However, the Fifth Number (N th)is Determined by
the Fact the Mean Must be 100 and by the Values of the First 4 Numbers.
- Therefore, there are 4 Degrees of Freedom (4 of the 5 Numbers are Free to Vary).
(14) Testing Hypotheses when Population Unknown

For any data set, it is assumed the Mean was Predetermined, it had to be that value.

For example, for our current example, it is assumed the Mean was Equal to 100
before the sample was ever selected. Therefore, the numbers in the data set had to
have a mean of 100 because that mean was determined before.

Therefore, the first N – 1 Numbers can take on any value (are Free to Vary); However,
the Nth Number is determined by the Mean and the Values of the other numbers.
(15) Testing Hypotheses when Population Unknown

Hopefully, that explanation of Degrees of Freedom was clear. However, in case it was
not clear; the main thing to remember is that for the t-test (and most statistical tests)
the Degrees of Freedom are Equal to N – 1 (Sample Size Minus One).
Therefore,
N = 100; df = 99
N = 273; df = 272
N = 40; df = 39
N = 12; df = 11
N = 75; df = 74
N = 29; df = 28
N = 16; df = 15
(16) Testing Hypotheses when Population Unknown

For the Z-Statistic, there was One Set of Critical Values for α = .05; ± 1.96; and One
Set of Critical Values for α = .01; ± 2.576.

However, for the t-Statistic, there are an infinite number of Critical Values for both
α = .05 and α = .01.

This is because there is only ONE Normal Curve (Z-Distribution); however, there are
an Infinite Number of t-Distributions – One for Each Different Degrees of Freedom (df).

As you will see later, when Degrees of Freedom are Infinite, the t-Distribution
becomes the Normal Distribution and the Critical Values are the Same for the t-
Distribution with Infinite Degrees of Freedom and the Z-Distribution (α = .05 - ± 1.96;
and α = .01 - ± 2.576).
Z and t
Distributio
ns
Z Distribution and
t Distribution for Different
Sample Sizes
t-Distribution 1-tail
Table

2-tail
0.05 0.01
t- 1-tail
Distribution
Table
2-tail
0.05 0.01

Current
Example,
df = 9
α = .05
Hypothesis Test For Example 1
(1) Write Hypotheses
Ho: μ = 120 (Population Mean BP if Treatment has No Effect)
H1: μ ≠ 120 (Population Mean BP if Treatment has Effect)
(2) Set Criteria
α = .05 (5% Probability of Making a Type I Error)
(3) Calculate Test Statistic
= 4.2426; = 1.3416; t = = -7.4536

(4) Make Decision


| -7.454 | > | - 2.2620 | Reject HO – Treatment Significantly
t-Observed t-Critical Lowers Blood Pressure
(17) Testing Hypotheses when Population Unknown

Just like the Hypothesis Test Using the t-Test is just like the Hypothesis Test Using
the Z-Test – the only difference is the substitution of (t-test) for (Z-test).

After we Reject Ho using the t-test, we proceed just as we do when we Reject Ho


using the Z-test; We Calculate Confidence Intervals and Treatment Effect Size.

And, just like using the t-test we substitute (t-test) for (Z-test); when calculating
Confidence Intervals and Treatment Effect Size following the t-test, we substitute
(t-test) for (Z-test).
Confidence Interval For Example 1

For the Current t-test, Ho was Rejected. Therefore, Conclude that the Population Mean
for the Treated Population is NOT 120. We estimate that the Population Mean for the
Treated Population is somewhere around the Sample Mean (110).
See Next Slide to See the Location of
these Values in the t-distribution table.
Use the Equation:

For the 95% Confidence Interval:


For Current Example this is: = 106.97 to 113.03

For the 99% Confidence Interval:


For Current Example this is: = 105.64 to 114.36
1-tail

2-tail
0.05 0.01

Current
Current
Example, Example,
df = 9 df = 9
95% CI 99% CI
Effect Size
Just like we need a Measure of Treatment Effect Size when we Reject Ho using the
Z-test, we need a Measure of Treatment Effect Size when we Reject Ho using the
t-test.

Now, we calculate which is just like d except we divide by instead of

; Therefore, is divided by

Then, you compare the Observed d-value (the one you calculate above) to critical
values of d to determine the Size of the Effect.

Small = 0.00 – 0.20; Medium = 0.21 – 0.79; Large = 0.80 and Above
Effect Size For Example 1

Therefore, for the current problem, we have:

= 2.3570 Large Effect

Then, you compare the Observed d-value (the one you calculate above) to critical
values of d to determine the Size of the Effect.

Small = 0.00 – 0.20; Medium = 0.21 – 0.79; Large = 0.80 and Above
Alternative Measure of Effect Size
When the t-test is used to test the hypothesis that μ = Some Value, there is an
alterative way to look at the Treatment Effect Size, and that is the
Proportion of Variance in the DV that is Accounted for by the IV ().

Note: 1 - is the Proportion of Variation in the DV Not Accounted for by the IV.

DV IV

1 - r2 r2
Alternative Measure of Effect Size For Example 1

t-test Example 1: For the current example, we have:

= = = = .86

DV IV

14% of Variation in DV 86% of Variation in DV


Not Accounted for by IV
.14 .86
Accounted for by IV
Complete Example of t-test when
Population SD Unknown
(18) Testing Hypotheses when Population Unknown

Example 2: Assumed the Population Mean Reading Comprehension Score for 3rd
Grade Students is 80; however, the Population Standard Deviation is Unknown.

A researcher tests whether a New Program will Significantly Increase Reading


Comprehension Scores for 3rd Grade Students. The researcher selects 15 3rd Grade
Students and has them complete the New Program.

After completion of the New Program, the researcher measures each student’s
Reading Comprehension and calculates the mean for this sample. The sample mean
is 83. The researcher wants to minimize the Probability of Making a Type I Error.
The data are presented on the next slide
Example 2
NP (X - )
83 0 0
84 1 1
82 -1 1
81 -2 4 = 3.6253
85 2 4
86 3 9 = .9361
80 -3 9
79 -4 16 t = = 3.205
87 4 16
88 5 25
78 -5 25
89 6 36
77 -6 36
82 -1 1
84 1 1
Mean 83
Sum 184
Hypothesis Test for Example 2

(1) Write Hypotheses


Ho: μ = 80 (Population Mean Reading Comp. if Treatment has No Effect)
H1: μ ≠ 80 (Population Mean Reading Comp. if Treatment has Effect)
(2) Set Criteria
α = .01 (1% Probability of Making a Type I Error)
See Next Slide to See the Location of
(3) Calculate Test Statistic this Value in the t-distribution table.
= 3.6253; = .9361; t = = +3.205

(4) Make Decision


+ 3.205 > + 2.9770 Reject HO – New Program Significantly
t-Observed t-Critical Increases Reading Comp.
1-tail

2-tail
0.05 0.01

Current
Example,
df = 14
α = .01
Confidence Interval For Example 2

For the Current t-test, Ho was Rejected. Therefore, Conclude that the Population Mean
for the Treated Population is NOT 80. We estimate that the Population Mean for the
Treated Population is somewhere around the Sample Mean (83).
See Next Slide to See Location of these
Values in the t-distribution table.
Use the Equation:

For the 95% Confidence Interval:


For Current Example this is: = 80.99 to 85.01

For the 99% Confidence Interval:


For Current Example this is: = 80.21 to 85.79
1-tail

2-tail
0.05 0.01

Current
Current Example,
Example,
df = 14 df = 14
95% CI 99% CI
Effect Size For Example 2

For Example 2, the Effect Size is:

= Large Effect

Then, you compare the Observed d-value (the one you calculate above) to critical
values of d to determine the Size of the Effect.

Small = 0.00 – 0.20; Medium = 0.21 – 0.79; Large = 0.80 and Above
Alternative Measure of Effect Size For Example 2

For Example 2, the Proportion of Variation in the DV Accounted for by the IV is:

= = = = .72

DV IV

28% of Variation in DV 72% of Variation in DV


Not Accounted for by IV
.14
.28 .86
.72
Accounted for by IV
(19) Testing Hypotheses when Population Unknown

Example 3: Assumed the Population Mean Mathematics for 4th Grade Students is 72;
however, the Population Standard Deviation is Unknown.

A researcher tests whether a New Program will Significantly Increase Reading


Comprehension Scores for 3rd Grade Students. The researcher selects 12 4th Grade
Students and has them complete the New Program.

After completion of the New Program, the researcher measures each student’s
Mathematics Ability and calculates the mean for this sample. The sample mean is 74.
The researcher wants to Maximize the Power of the Test.
The data are presented on the next slide
Example 3
NP (X - )
74 0 0
76 2 4
72 -2 4
78 4 16 = 3.4641
70 -4 16
80 6 36 = 1.0
68 -6 36
75 1 1 t = = 2.0
73 -1 1
77 3 9
71 -3 9
74 0 0
Mean 74
Sum 132
Hypothesis For Example 3

(1) Write Hypotheses


Ho: μ = 72 (Population Mean Mathematics Score)
H1: μ ≠ 72 (Population Mean BP if Treatment has Effect)
(2) Set Criteria
α = .05 (5% Probability of Making a Type I Error)
(3) Calculate Test Statistic
; ; t = = 2.0

(4) Make Decision


+ 2.0 < + 2.201 Fail to Reject HO – New Program Does Not
t-Observed t-Critical Significantly Change
Math Comprehension
1-tail

2-tail

Current
Example,
df = 11
α = .01
Fail to Reject Ho - Finished

t-test Example 3: We are Finished – Fail to Reject Ho.

Do NOT Calculate Confidence Intervals as we know the value of μ = 72.

Do NOT Calculate Treatment Effect Size as there is NO Treatment Effect ( = 0)

Do NOT Calculate the Proportion of Variation in the DV Accounted for by the IV


As NONE of the Variation in the DV is Accounted for by the IV because we
Failed to Reject HO.
Testing Hypotheses Recap

Z-Test t-Test

(1) Conduct 4 Steps for Hypothesis Test (1) Conduct 4 Steps for Hypothesis Test
If Fail to Reject Ho – STOP If Fail to Reject Ho – STOP
(2) Calculate Confidence Interval (2) Calculate Confidence Interval

(3) Calculate Effect Size ( ) (3) Calculate Effect Size ( )

(4) Calculate Proportion of Variation


in DV Accounted for by IV (r 2)
Testing Hypotheses Recap

For BOTH Z-test and t-test; if Fail to Reject Ho:

- STOP. Do Not Calculate Confidence Intervals, Effect Size or Anything Else.


The End

You might also like