You are on page 1of 32

1

Test of Hypothesis

Source: Mahesh (2019). Everything You Need To Know about Hypothesis Testing – Part I. Retrived from:
https://towardsdatascience.com/everything-you-need-to-know-about-hypothesis-testing-part-i-4de9abebbc8a
Statistical Inference is to draw
conclusion about any population 2
parameter on the basis of the
Simple Tests of Hypothesis sample information.

Statistical hypothesis - is an assumption about a population parameter.


 an assertion subject to verification
 an assumption used as the basis for action
 a guess or prediction made by the researcher regarding the possible outcome of the study.
Hypothesis testing refers to the formal procedures used by statisticians or researchers to accept or reject
statistical hypotheses.
 The process of making an inference or generalization on population parameters based on the
results of the study on samples.
 The assertion we hold as true until we have sufficient statistical evidence to conclude otherwise.
In hypothesis testing, one draws conclusions about the population using sample data.
There are two types of statistical hypotheses.
1. Null hypothesis. The null hypothesis, denoted by Ho, is usually the hypothesis that sample observations
result purely from chance.
 Must always express the idea of non-significance of difference or relationship
 Hypothesis to be tested
 Always hoped to be rejected
Examples on how to state the null hypothesis:
a. There is no significant relationship between the respondents’ sex and academic performance.
b. One variable does not depend on the other variable.
c. Two variables are independent from each other.

2. Alternative hypothesis. The alternative hypothesis, denoted by H1 or Ha, is the hypothesis that sample
observations are influenced by some non-random cause.
 The one that we conclude is true if the H o is rejected.
 States that there is an effect, there is a difference, or there is a relationship.
 Generally represents the idea which the researcher wants to prove
Examples on how to state the alternative hypothesis:
a. There is a significant relationship between the respondents’ sex and academic performance.
b. One variable depends on the other variable.
c. Two variables are dependent from each other.

Must watch (Introduction to Hypothesis Testing): https://www.youtube.com/watch?v=plAiYXYaqY0&t=77s

Can We Accept the Null Hypothesis?


Some researchers say that a hypothesis test can have one of two outcomes: (1) you accept the null hypothesis
or (2) you reject the null hypothesis. Many statisticians, however, take issue with the notion of "accepting the null
hypothesis." Instead, they say: you reject the null hypothesis or you fail to reject the null hypothesis.
Why the distinction between "acceptance" and "failure to reject?" Acceptance implies that the null hypothesis is
true. Failure to reject implies that the data are not sufficiently persuasive for us to prefer the alternative hypothesis
over the null hypothesis.

Source: StatTrek founded by Harvey Berman (2020). What is Hypothesis Testing?.


Retrived from: https://stattrek.com/hypothesis-test/hypothesis-testing.aspx
3

Decision Errors
Two types of errors can result from a hypothesis test.
1. Type I error (α error). A Type I error occurs when the researcher rejects a null hypothesis when it is true.
 Rejecting a true Ho
 Example: Ho: Juan is not guilty. If the judge convicts Juan when in fact he is not guilty, the court
commits a Type I error.
 α is read as Alpha which means level of significance
2. Type II error (β error). A Type II error occurs when the researcher fails to reject a null hypothesis that is
false.
 Accepting a false Ho
 Example: Ho: Juan is not guilty. If the judge acquits Juan when in fact he is guilty, the court commits a
Type II error.
 β is read as Beta

The probability of not committing a Type II error is called the Power of the test.

Decision Ho is actually:
True False
Reject Ho Type I Error Correct

Fail to Reject Ho Correct Type II Error

Must watch (Type I and Type II Errors ): https://www.youtube.com/watch?v=Sdw2E7Xi0Q0

This is an illustration to visually present the Type I and Type II errors.

Source of Image: Effect Size FAQs by Paul Ellis


4

Decision Rules

1. P-value. The strength of evidence in support of a null hypothesis is measured by the P-value. Suppose the
test statistic is equal to S. The P-value is the probability of observing a test statistic as extreme as S,
assuming the null hypothesis is true. If the P-value is less than the significance level, we reject the null
hypothesis.
Note: The lower the p-value, the stronger the evidence that the null hypothesis is false.

2. Region of acceptance. The region of acceptance is a range of values. If the test statistic falls within the
region of acceptance, the null hypothesis is not rejected. The region of acceptance is defined so that the
chance of making a Type I error is equal to the significance level.

The set of values outside the region of acceptance is called the region of rejection. If the test statistic falls
within the region of rejection, the null hypothesis is rejected. In such cases, we say that the hypothesis has
been rejected at the α level of significance.

Source: StatTrek founded by Harvey Berman (2020).What is Hypothesis Testing?. Retrieved from: https://stattrek.com/hypothesis-
test/hypothesis-testing.aspx

Area between z = -1.96 to z = 1.96 = 0.95


Required A = (1 – 0.95) ÷ 2 = 0.025

Source: From Wikimedia Commons. Region of rejections or acceptance. Retrieved from:


https://commons.wikimedia.org/wiki/File:Region_of_rejections_or_acceptance.png

One-Tailed and Two-Tailed Tests

A test of a statistical hypothesis, where the region of rejection is on only one side of the sampling distribution, is
called a one-tailed test. For example, suppose the null hypothesis states that the mean is less than or equal to
10. The alternative hypothesis would be that the mean is greater than 10. The region of rejection would consist
of a range of numbers located on the right side of sampling distribution; that is, a set of numbers greater than
10. Acceptance Region
5

A test of a statistical hypothesis, where the region of rejection is on both sides of the sampling distribution, is
called a two-tailed test. For example, suppose the null hypothesis states that the mean is equal to 10. The
alternative hypothesis would be that the mean is less than 10 or greater than 10. The region of rejection would
consist of a range of numbers located on both sides of sampling distribution; that is, the region of rejection
would consist partly of numbers that were less than 10 and partly of numbers that were greater than 10.

Source: StatTrek founded by Harvey Berman (2020). What is Hypothesis Testing?.


Retrived from: https://stattrek.com/hypothesis-test/hypothesis-testing.aspx
Acceptance Region is the region for
accepting true null hypothesis.

Critical Region is the region where


true null hypothesis is rejected.
In summary:
One Tailed Test
 Is used if the alternative hypothesis is directional
Examples:
 The yield is greater than…
 The mean score is less than…
 (< or >)
Two –Tailed Test
 Is used if the alternative hypothesis is non-directional.
Example:
 Score A is not equal to score B

There is no rule to identify the one tailed and two tailed test of hypothesis. Generally, if direction of
differences is not given in the statement of hypothesis, then we use two tailed test. Similarly, if the
direction of difference like at least, at most, increase, decrease, majority, minority, larger, taller, high, low,
more than, less than etc. is included in the statement of hypothesis, then we use on tailed test.

Source: Raj Chand Takuri (2019). Testing of Hypothesis. In SlideShare. Retrieved from:
https://www.slideshare.net/RajThakuri/testing-of-hypotheses

Read “Understanding Hypothesis Tests: Significance Levels (Alpha) and P values in Statistics”
Link: https://blog.minitab.com/blog/adventures-in-statistics-2/understanding-hypothesis-tests-significance-levels-alpha-and-p-values-in-
statistics
6

Level of Significance of a Test


 is the maximum value of the probability of rejecting the null hypothesis (H o) when in fact it is true.
 the maximum size of Type I error that researcher prepared to take risk.
 the probability of rejecting a true hypothesis
 is a measure of the strength of the evidence that must be present in your sample before you will reject
the null hypothesis and conclude that the effect is statistically significant.
A 5% significance level means that we can accept 5 chances in 100 that we could reject the null hypothesis
when it should be accepted. It also implies that we are 95% confident that we have made the right
decision.
 It indicates a 5% risk of concluding that a difference exists when there is no actual difference.
Degrees of Freedom
 Measures the number of scores that are free to vary when computing the sum of squares for sample
data.
 refers to the maximum number of logically independent values, which are values that have the freedom
to vary, in the data sample.

In testing the difference between two means, the z-test or t-test may be used.

 z-test is used when the population standard deviation is known.

 t-test is used when the sample standard deviations are known.

Steps in Hypothesis Testing

1. Formulate the null hypothesis (Ho) that there is no significant difference between items being compared.
State the alternative hypothesis (Ha) which is used in case Ho is rejected.
2. Set the level of significance, α. Typically the 0.05 or the 0.01 level is used.
3. Determine the test to be used.
4. Determine the degrees of freedom (df) and the tabular value for the test.
 For a single sample, df = number of items – 1 = n – 1.
 For two samples, df = n1 + n2 – 2, where n1 refers to the number of items in the first sample; and the n 2
refers to the number of items in the second sample.
 For a z-test, use the table of critical values of z based on the area of the normal curve.
 For a t-test, look for the tabular value from the table of t-distribution.
5. Compute for z or t as needed, using any of the formulas found on the next page.
7

A. z-test
a. Sample mean compared with Population mean

z= ( - μ) n
σ
where:

= sample mean
µ = population mean
σ = population standard deviation
n = number of items within the sample

b. Comparing Two Sample Means

where:
1 = mean of the first sample
2 = mean of the second samle
s1 = standard deviation of the first sample
s2 = standard deviation of the second sample
n1 = number of items in the first sample
n2 = number of items in the second sample

c. Comparing Two Sample Proportions

P1 - P2
z= -----------------------------
P1q1 + P2q2
n1 n2

where:
P1 = proportion of the first sample
P2 = proportions of the second sample
q1 = 1 – P1
q2 = 1 - P2
n1 = number of items in the first sample
n2 = number of items in the second sample
B. t-test
a. Sample Mean Compared with Population

t = ( - μ) n -1
s
8

where:

= sample mean
µ= population mean
s= sample standard deviation
n= number of items within the sample
b. Comparing Two Sample Means (independent-measures t statistic)

Where:
1 = mean of the first sample
2 = mean of the second sample
s1 = standard deviation of the first sample
s2 = standard deviation of the first sample
n1 = number of items in the first sample
n2 = number of items in the second sample

c. t-test for correlated or dependent data (repeated-measures design)

∑D
t= ----------------------------------
N ∑ D2 - (∑ D)2
--------------------------
n-1

Where:
D = the difference between the two scores (posttest – pretest)
n = number of samples
∑D2 = the sum of the squares of the difference between the posttest and pretest
∑D = the summation of the difference between the posttest and pretest

Recall Decision Rules in Rejecting the Null Hypothesis

Using the computed value and tabular/critical value


If computed value > tabular value --- reject Ho and accept Ha
If computed value < tabular value --- do not reject Ho or fail to reject Ho

Using the p-value and level of significance


If p-value < level of significance (α) --- reject Ho and accept Ha
If p-value > level of significance (α --- do not reject Ho or fail to reject Ho

Read: “Failing to Reject the Null Hypothesis”


Link: https://statisticsbyjim.com/hypothesis-testing/failing-reject-null-hypothesis/
9

Tables Used in Identifying the Tabular or Critical Values of t and z.

t-distribution Table z- Table (critical values)

Test Level of Significance (α)


0.01 0.05
One-tailed ±2.33 ±1.65
Two-tailed ±2.58 ±1.96

Source: Published in Statology by Zach (2020). How to Read the t-Distribution Table. Retrieved from:
https://www.statology.org/how-to-read-t-distribution-table/

Note: In this lesson, we will be considering only z-test for comparing two sample means, t-test for comparing
two samples means (independent data) and t-test for correlated or dependent data.
10

Practice Activity Using Excel


(This activity will help you in our next activities.)

Find the mean, standard deviation and variance of the following data.
Scores
Note:
88
A function in Excel and Google Sheets is a built-
87 in formula. All functions begin with the equal
78 sign (=) followed by the function's name such as
AVERAGE, STDEV, SUM, etc.
90
88

1. Encode data in excel.


2. Solve for the mean following the syntax below.

Row 3
Column B

Useful Link in solving for the mean, standard deviations and variance
if excel is not available.
https://www.mathsisfun.com/data/standard-deviation-calculator.html
https://www.socscistatistics.com/descriptive/variance/default.aspx

This will be the formula in getting the mean ( ) or


average. Note that the data are encoded in Colum B
from Row 3 to Row 7. Hence the range is from B3:B7.
Row 7

2. Solve for the standard deviation.

You may type the range (B3:B7) or you may


highlight the data. Then press Enter.

This is the formula in finding the standard deviation (s or sd).

Round off the mean and sd


to the nearest hundreths.

2
Results: Variance (s ) is calculated by
squaring the standard deviation.
= 86.20
s = 4.71 s2 = (4.71)*(4.71) = 22.18
s2 = 22.18
11

Example1: (Using z-test for comparing two sample means; n ≥ 30 for both groups)
An instructor wants to know if students without calculator got significantly lower scores in Statistics
exam than those students with calculator. He gathered the following data:
No. With Without
Calculator Calculator
1. 85 80
2. 86 75
3. 95 78
4. 87 85 The number 1 or the
5. 75 77 subscript 1 in n1 or s1 means
6. 88 82 that you are considering the
7. 86 80 first group of students. The
8. 84 85 n2 or s2 also means that you
9. 92 86 are considering the second
10. 78 90 group of students.
11. 79 74
12. 83 85
13. 96 81
14. 89 83
15. 88 77
16. 87 78
17. 85 88
18. 79 92
19. 85 85
20. 86 74
21. 87 77
22. 88 85
23. 90 82
24. 89 85
25. 89 84
26. 89 86
27. 91 85
28. 90 88
29. 88 79 The z-Table is used
30. 89 78 since z-test is utilized.
31. 90
32. 88
Solution:
1. Ho: There is no significant difference between the mean scores of the two groups of students.
(μ 1 = μ 2)
Ha : There is a significant difference between the mean scores of the two groups of students.
(μ 1 ≠ μ 2) non directional test, two tailed test
2. α = 0.05 z- Table (critical values)
3. use z-test for comparing two sample means
(since n in both groups ≥ 30). Test Level of Significance (α)
4. df = n1 + n2 – 2 = 32 + 30 - 2 = 60 0.01 0.05
Tabular z or critical z = 1.96 (for α = 0.05) One-tailed ±2.33 ±1.65
Two-tailed ±2.58 ±1.96
12

5. Computation: Instead of manual computation, excel will be used.


Formula:

No. With Without


Calculator Calculator
1. 85 80
2. 86 75
3. 95 78
4. 87 85
5. 75 77
6. 88 82
7. 86 80
8. 84 85
9. 92 86
10. 78 90
11. 79 74
12. 83 85
13. 96 81
14. 89 83
15. 88 77
16. 87 78
17. 85 88
18. 79 92
19. 85 85
20. 86 74
21. 87 77
22. 88 85
23. 90 82
24. 89 85
25. 89 84
26. 89 86
27. 91 85
28. 90 88
29. 88 79
30. 89 78
31. 90
32. 88

Getting the mean ( ) of students


with calculator

Note: To get the and sd of students without Getting the standard deviation (s)
calculator, simply drag the formula to the right. of students with calculator
13

Data obtained after using excel:

Students with Calculator: Students without Calculator


n1 = 32 n2 = 30
= 86.91 = 82.13
s1 = 4.51 s2 = 4.75
s12 = 20.35 s22 = 22.53 To get the variance, you have to
square the standard deviation (s).

Useful Link in solving for the mean, standard deviations and variance
if excel is not available.
https://www.mathsisfun.com/data/standard-deviation-calculator.html
https://www.socscistatistics.com/descriptive/variance/default.aspx

86.91 - 82.13
z= -------------------------------------
(4.51)2 + (4.75)2
32 30

4.78 4.78
z= -------------------------------- = --------------- = 4.058
0.6356 + 0.7521 1.1780

The computed z-value = 4.058.

Illustrating the results using the normal curve:

The critical z-value is 1.96. The computed z-value is 4.058. This


means that the area to the right of computed z is in the region of
rejection. Hence, the null hypothesis is rejected.
14

Use this Link for z-test : http://www.statskingdom.com/120MeanNormal2.html

Data
Students with Calculator: Students without Calculator 1. Solve for and S
n1 = 32 n2 = 30
= 86.91 = 82.13
s1 = 4.51 s2 = 4.75
2 2
s1 = 20.35 s2 = 22.53

2. Enter Data

3. Click Calculate and results will be


seen at the bottom of the screen.

p-value = 0.000

Computed z = 4.058

Tabular z = 1.96
15

Recall Decision Rules in Rejecting the Null Hypothesis

Using the computed value and tabular/critical value


If computed value > tabular value --- reject Ho and accept Ha
If computed value < tabular value --- do not reject Ho or fail to reject Ho

Using the p-value and level of significance


If p-value < level of significance (α) --- reject Ho and accept Ha
If p-value > level of significance (α --- do not reject Ho or fail to reject Ho

Final Table and Discussion

Using the computed value and tabular/critical value

Table 1
Analysis Table of the Mean Scores of the Students With and Without Calculators
s n Computed Critical Decision Remark
Students z z
With Calculator 86.91 4.51 32 4.058 1.96 Reject Ho Significant

Without Calculator 82.13 4.75 30

5% level of significance and 60 degrees of freedom

Discussion:

Table 1 presents the mean scores of the two groups of students. The first group is using a calculator
and the second group does not have a calculator. As presented, the group of students with calculator has a
mean rating (86.91) which is numerically higher than the mean rating of the group of students without calculator
(82.13). To test the data statistically, z-test is utilized (since n ≥ 30). The findings indicate that the computed z-
value (4.058) is greater than the critical z-value (1.96). This finding results to the rejection of the null
hypothesis. This means that at 5% level, there is a significant difference in the mean ratings of the students in
favor of those group with calculator. This implies that the use of calculator helps the students in obtaining a
higher rating.
16

Using the p-value and level of significance (This is widely used by most researchers).

Previous Results

Table 1
Analysis Table of the Mean Scores of the Students With and Without Calculators
n = 62
s n Decision Remark
Students p-value
With Calculator 86.91 4.51 32
0.000 Reject Ho Significant

Without Calculator 82.13 4.75 30

Level of significance = 0.05; df = 60

Discussion:

Table 1 presents the mean scores of the two groups of students. The first group is using a calculator
and the second group does not have a calculator. As presented, the group of students with calculator has a
mean rating (86.91) which is numerically higher than the mean rating of the group of students without calculator
(82.13). To test the data statistically, z-test is utilized (since n ≥ 30). The findings indicate that the computed p-
value (0.000) is less than the level of significance (0.05). This finding results to the rejection of the null
hypothesis. This means that at 5% level, there is a significant difference in the mean ratings of the students in
favor of those group with calculator. This implies that the use of calculator helps the students in obtaining a
higher rating.
17

Source: Andrew A. Jawlik. Statistics from A to Z – Confusing Concepts Clarified.


Retrieved from: https://www.youtube.com/watch?v=_iZ-9lVHCVU

Visit this link for you to understand the concept on “I Fail to Reject the Null Hypothesis”.
18

Activity No. 13
z-test for Comparing Two Sample Means
Problem
A professor is eager to identify if students coming from private schools are better than those students coming
from public schools in Statistics subject. She gathered the following data:

No. Private Public Solution:


1. 88 90
1. Ho: ___________________________________________________
2. 75 89
3. 80 88 ___________________________________________________
4. 89 86 (μ 1 = μ 2)
5. 77 85
6. 68 84
Ha : ___________________________________________________
7. 88 89
8. 75 91 ___________________________________________________
9. 78 88 (μ 1 ≠ μ 2) non directional test, two tailed test
10. 82 92
11. 81 87
2. α = 0.05 (use 0.05 if its not emphasized in the problem)
12. 84 88
13. 85 88 3. use z-test for comparing two sample means (≥ 30).
14. 83 86
15. 79 92 4. df = n1 + n2 – 2 = ___________________ = ______
16. 91 85
Tabular or critical z-value = ______
17. 88 84
18. 86 87 5. Computation:
19. 85 88
20. 79 88 Use Excel in getting the standard deviation and variance:
21. 80 90
s1 (private) = ______ s2 (public) = ______
22. 83 91
23. 84 92
24. 86 88 (s1)2 (private) = ______ (s2)2 (public) = ______
25. 82 86
26. 75 87
27. 88 85
28. 76 85
29. 80 86
30. 75 87
31. 77 86
32. 89
19

Final Table and Discussion

Using the computed value and tabular/critical value ONLY:

Table 1
Analysis Table of the Mean Scores of the Students From Private and Public Schools
s n Computed Critical Decision Remark
Students z z
Private

Public

5% level of significance and ______ degrees of freedom

Discussion:

__________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_______________________________________________________________________________________
20

Example 2: (Using t-Test for Comparing Two Sample Means; n < 30)
The following are the scores of 14 male and 14 female students in Mathematics. Test the null hypothesis that
there is no significant difference between the performance of the male and female students. Use 0.05 level of
significance.
Male Female
80 81 Useful Link in solving for the mean, standard deviations and variance if excel is not available.
80 84 https://www.mathsisfun.com/data/standard-deviation-calculator.html
84 84 https://www.socscistatistics.com/descriptive/variance/default.aspx
84 85
84 85
87 87
88 87
89 88
90 90
90 91
91 91
91 91
92 91
92 92
Solution:
1. Ho: There is no significant difference between the mean scores of the students in Mathematics subject.
(μ 1 = μ 2)
Ha : There is a significant difference between the mean scores of the students in Mathematics subject.
(μ 1 ≠ μ 2) non directional test, two tailed test
2. α = 0.05
t-distribution Table
3. use t-Test for comparing two means (n < 30)
4. df = n1 + n2 – 2 = 14 + 14 - 2 = 26
Tabular t or critical t = 2.056
5. computation:
Method 1: (Use excel in getting the mean and standard deviation
and manually compute the value of t.)

1 = 87.28 (Male) 2 = 87.64 (Female)


s1 = 4.20 s2 = 3.46
n1 = 14 n2 = 14

The intersection of df = 26 and α = 0.05 is 2.056


which is the tabular/critical value of t.

Computed value of t
-
21

Method 2: Using Online Calculator


Link: http://vassarstats.net/
Steps
1. Type vassarstats.net
2. Click t-Tests & Procedures (found at the left side)
3. Click t-Test for Independent or Correlated Samples
4. Click Independent Samples
5. Copy Scores of Male students and Paste in Sample A Box.
6. Copy Scores of Female students and Paste in Sample B Box.
7. Click Calculate. Results will be reflected as shown below.

Mean (Male)

Mean (Female)

Computed t-value

p-value (two-tailed)

Recall Decision Rules in Rejecting the Null Hypothesis

Using the computed value and tabular/critical value


If computed value > tabular value --- reject Ho and accept Ha
If computed value < tabular value --- do not reject Ho or fail to reject Ho

Using the p-value and level of significance


If p-value < level of significance (α) --- reject Ho and accept Ha
If p-value > level of significance (α --- do not reject Ho or fail to reject Ho
22

Final Table and Discussion

Using Computed t-value and Tabular or Critical t-value

Table 2
Analysis Table of the Mean Scores of the Students in Mathematics
n = 28
Computed Critical
Respondents s n t t Decision Remark
Male 87.29 4.20 14 -0.247 2.056 Fail to reject Ho Not significant
Female 87.64 3.46 14
5% level of significance and 26 degrees of freedom

Discussion:

Table 2 presents the mean scores of the students in Mathematics subject. It is reflected that the mean
score of the female students (87.64) is numerically higher than the mean score of the male students (87.28). To
test the data statistically, t-test for comparing two means is applied. It is shown that the computed t-value (-
0.247) is less than the tabular or critical t-value (2.056). At 5% level of significance and 26 degrees of freedom,
the null hypoyhesis is not rejected. This means that the data are not sufficient to conclude that there is a
significant difference between their means. This result may suggest that the mean achievements of the female
and male students are just the same.

Using p-value and level of significance

Table 2
Analysis Table of the Mean Scores of the Students in Mathematics
n = 28
Respondents s n p-value Decision Remark
Male 87.29 4.20 14 0.805 Fail to reject Ho Not significant
Female 87.64 3.46 14
Level of significance = 0.05; df = 26
Discussion:

Table 2 presents the mean scores of the students in Mathematics subject. It is reflected that the mean
score of the female students (87.64) is numerically higher than the mean score of the male students (87.28). To
test the data statistically, t-test for comparing two means is applied. It is shown that the p-value (0.805) is
greater than the level of significance (0.05). Thus, the null hypoyhesis is not rejected. This means that the data
are not sufficient to conclude that there is a significant difference between their means. This result may suggest
that the mean achievements of the female and male students are just the same.
23

Name: __________________________ Score:_________________________

Activity# 14
t-test for Comparing Two Sample Means (Independent or Uncorrelated Data)

Problem:
A personality test was administered to 15 boys and 11 girls in a private school to test whether the girls differed
in their personality from that of the boys. Higher scores indicate higher personality traits.

Data: Solution:
No. Boys Girls
6. Ho: ___________________________________________________
33. 11 17
34. 16 19 ___________________________________________________
35. 16 22 (μ 1 = μ 2)
36. 19 24
37. 20 27
Ha : ___________________________________________________
38. 20 25
39. 20 26 ___________________________________________________
40. 21 29 (μ 1 ≠ μ 2) non directional test, two tailed test
41. 23 32
42. 24 35
7. α = 0.05 (use 0.05 if its not emphasized in the problem)
43. 26 36
44. 27 8. use t-test for comparing two sample means (< 30).
45. 28
46. 30 9. df = n1 + n2 – 2 = ___________________ = ______
47. 32
Tabular or critical t-value = ______ (from the t-distribution Table)

10. Computation:

1 (boys) = ______ 2 (girls) = ______

s1 (boys) = ______ s2 (girls) = ______

t-value = ______

p-value = ______
24

Final Table and Discussion (Using the computed t and tabular or ciritical t values)

Table 1
Analysis Table of the Mean Scores of the Boys and Girls in a Personality Test
n = _________

Computed Critical
Respondents t t Decision Remark
s n

Boys

Girls
5% level of significance and _____________ degrees of freedom

Discussion:

_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
25

Example 3. (Using t-Test for Correlated or Dependent Data)


The following data are results of administering a test to a group of students before and after a tutorial
session. Make a directional test with alpha = 0.05.

Pretest Posttest
18 20
16 22
18 24
12 10
20 25
17 19
18 20
20 21
22 23
20 20
10 10
8 12
20 22
12 14
16 12
16 20
18 22
20 24
18 23
21 17

Solution:
1. Ho: There is no significant difference between the Pretest and Posttest results of the students.
(μ 1 = μ 2)
Ha : There is a significant difference between the means of the Pretest and Posttest results of the studentst.
(μ 2 > μ 1) directional test, one - tailed test (antipating that posttest scores > Pretest scores)

2. α = 0.05

3. use t-test for correlated or dependent data

4. df = n – 1 = 20 - 1 = 19 (n = refers to the number of paired observations)

5. computation:
D = Posttest – Pretest = 20 – 18 = 2 26

Method 1: Manual Computation


D2 = 22 = 4 (square D)

Pretest Posttest D D2
18 20 2 4
16 22 6 36
18 24 6 36
12 10 -2 4
20 25 5 25
17 19 2 4
18 20 2 4
20 21 1 1
22 23 1 1
20 20 0 0
10 10 0 0
8 12 4 16
20 22 2 4
12 14 2 4
16 12 -4 16
16 20 4 16
18 22 4 16
20 24 4 16
18 23 5 25
21 17 -4 16
Add all results of D2
2
= 17 = 19 ∑D= 40 ∑D = 244

Add all results of D


27

Method 2: Using Online Calculator


Link: http://vassarstats.net/
Steps
1. Type vassarstats.net
2. Click t-Tests & Procedures (found at the left side)
3. Click t-Test for Independent or Correlated Samples
4. Click Correlated Samples
5. Copy Pretest Scores and Paste in Sample A Box.
6. Copy Posttest Scores and Paste in Sample B Box.
Click Calculate. Results will be reflected as shown below.

Mean (Pretest)

Mean (Posttest)

Computed t-value p-value (one-tailed test)


28

Final Table and Discussion:

Using results from Data Analysis ToolPak

Pretest
= 17

Posttest
= 19

Computed Value
Computed t = -3.044 (or 0.3.044)
p-value = 0.003
Critical or Tabular t = 1.729

Using Computed t and Tabular t

Table 3
Testing the Significance of the Difference Between Means of the
Pretest and Posttest Results of the Students
n = 20
Computed Critical
Test t t Decision Remark

Pretest 17 3.044 1.729 Reject Ho significant


Posttest 19
5% level of significance and 19 degrees of freedom

Table 3 reveals the overall results of administering a test to a group of students before and after a
tutorial session . It can be gleaned in the table that the posttest mean score (19) is two points higher than the
pretest mean score (17). Using t-test for correlated or dependent data, it shows that the computed t-value
(3.044) is greater than the tabular or critical t-value (1.729) at 5% level of significance and 19 degrees of
freedom. This finding will result to the rejection of the null hypothesis which means that there is a significant
difference between the posttest and pretest results of the students. This simply implies that the tutorial class has
an impact to the students and it is effective that made them obtained better scores in the posttest.
29

Using p-value and Level of Significance

Table 3
Testing the Significance of the Difference Between Means of the
Pretest and Posttest Results of the Students
n = 20
Test p-value Decision Remark

Pretest 17 0.003 Reject Ho significant


Posttest 19
Level of significance = 0.05; df = 19

Table 3 reveals the overall results of administering a test to a group of students before and after a
tutorial session . It can be gleaned in the table that the posttest mean score (19) is two points higher than the
pretest mean score (17). Using t-test for correlated or dependent data, it shows that the computed p-value
(0.003) is less than the level of significance (0.05). This finding will result to the rejection of the null hypothesis
which means that there is a significant difference between the posttest and pretest results of the students. This
simply implies that the tutorial class has an impact to the students and it is effective that made them obtained
better scores in the posttest.
30

Name: __________________________ Section:_________________________

Activity # 15
t-Test for Correlated or Dependent Data
Problem:
A group of students was given an attitude test and a controversial subject. Then they were shown a film
favorable to the subject and the attitude test was then re-administered. Make a directional test with alpha = 0.01.

Data:
Scores Scores After Solution:
Before the the Film
1. Ho: ___________________________________________________
Film Showing Showing
17 21 ___________________________________________________
18 22 (μ 1 = μ 2)
20 24
24 28 Ha : ___________________________________________________
24 34 ___________________________________________________
22 20 (μ2 > μ1) directional test, one - tailed test
20 24
17 23 2. α = 0.01 (this is emphasized in the problem)
10 18
3. use t-test for dependent or correlated data
11 19
20 26 4. df = n – 1 = ___________________(df for paired observations)
15 20
Tabular or critical t-value = ______ (from the t-distribution Table or this
can be seen in the output if you are using Data Analysis ToolPak)

5. Computation:

1 (pretest) = ______ 2 (posttest) = ______

t-value = ______

p-value = ______
31

Final Table and Discussion: (Using the computed t and tabular or critical t values)

Table 3
Testing the Significance of the Difference Between Means of the
Pretest and Posttest Results of the Students
n = _________
Computed Critical
Test t-value t-value Decision Remark

Pretest
Posttest
1% level of significance and _____________ degrees of freedom

Discussion:

_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
32

You might also like