100% found this document useful (1 vote)
5K views13 pages

Hypothesis Testing Z-Test and T-Test

Hypothesis testing involves stating a null hypothesis and an alternative hypothesis and using statistical methods to determine whether to reject or fail to reject the null hypothesis. There are two types of hypotheses: the null hypothesis, which is initially assumed to be true, and the alternative hypothesis, which the researcher aims to support. There are two types of errors in hypothesis testing - Type I errors involve rejecting a true null hypothesis, while Type II errors involve failing to reject a false null hypothesis. Hypothesis tests can be one-tailed or two-tailed depending on the alternative hypothesis. Critical values determine the rejection region where the null hypothesis would be rejected.

Uploaded by

mochi
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
100% found this document useful (1 vote)
5K views13 pages

Hypothesis Testing Z-Test and T-Test

Hypothesis testing involves stating a null hypothesis and an alternative hypothesis and using statistical methods to determine whether to reject or fail to reject the null hypothesis. There are two types of hypotheses: the null hypothesis, which is initially assumed to be true, and the alternative hypothesis, which the researcher aims to support. There are two types of errors in hypothesis testing - Type I errors involve rejecting a true null hypothesis, while Type II errors involve failing to reject a false null hypothesis. Hypothesis tests can be one-tailed or two-tailed depending on the alternative hypothesis. Critical values determine the rejection region where the null hypothesis would be rejected.

Uploaded by

mochi
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/ 13

HYPOTHESIS TESTING

HYPOTHESIS is a form of statement and the truth or validity or certainty of any statement is
questionable, it is imperative that such a statement must be tested significantly in order to
ascertain its truth or validity. Having tested the statement to be valid or invalid; true or false; one
is able to enunciate his judgment or decision.

A hypothesis is simply a statement that something is true. It is a tentative explanation, a claim, or


assertion about people, objects, or events.

Examples:
1. There is no significant relationship between mathematics attitude and competency levels of
second year accountancy students of CIC.
2. The percentage of shoppers who buy their favorite toothpaste regardless of price is 25%.

Such statements are subjected to statistical testing in order to determine whether it is true or
false. If the statement is true, then it is not rejected. On the contrary, if the statement is false, it is
rejected.

Hypothesis Testing is a procedure in making decisions based on a sample evidence or


probability theory used to determine whether the hypothesis is rejected or not. If the statement is
found reasonable, then, the hypothesis is not rejected, otherwise, it is rejected.

Two Types of Hypotheses

1. Null Hypothesis is denoted by H0. H stands for hypothesis and subscript 0 (zero) implies
no difference. It is the statement being tested and is initially assumed to be true. It is a
statement of no effect; of equality; of having no difference.
2. Alternative Hypothesis is denoted by H1. It is the research hypothesis. It is the statement
that the researchers want to support. It specifies existence of a difference or a relationship.

Examples:
1. Title: The Effects of Texting on the Academic Achievements of High School Students of
SRLCS.
H0 ===🡺 Texting of high school students of SRLCS has no significant effect on their
academic achievements.
H1 ===🡺 Texting of high school students of SRLCS has significant effects on their academic
achievements.

2. Title: The Correlation of Students’ Grades in English and Mathematics.


H0 ===🡺 There is no correlation between the grades of students in English and Mathematics.
H1 ===🡺 There is a correlation between the grades of students in English and Mathematics.

Types of Errors
Type I Error: Rejecting the null hypothesis when in fact it is true.

Type II Error: Not rejecting the null hypothesis when in fact it is false.

Fact Decision H0 is true H0 is false

Do not reject H0 Correct decision Type II error

Reject H0 Type I error Correct Decision

1
Level of Significance

⮚ The probability of committing a Type I error is called the level of significance of a test and is
denoted by alpha (α ).
⮚ A (1 – α ) value represents the level of confidence. For hypothesis, it is customary to use an α
of 0.05 or 0.01.
⮚ An α = 5% or 0.05 implies 0.95 or 95% level of confidence.
⮚ An α = 1% or 0.01 implies a 0.99 or 99% level of confidence.
⮚ The level of significance of a test is always associated with the rejection region of the test
(critical region), while level of confidence is associated to the acceptance region of the test.
⮚ The critical value of the test is the value that divides the distribution of the test into the
rejection and acceptance regions.

One-Tailed and Two-Tailed Tests

⮚ One way of determining the type of test used in hypothesis testing is based on how the
alternative hypothesis is formulated.
⮚ A one-tailed test is used when the alternative hypothesis is directional which means that the
value of the measures is either greater than ( > ) or less than ( < ) the other measures.
⮚ A one-tailed test is a hypothesis test for which the rejection region lies at only one tail of the
distribution.
⮚ One-tailed is a test classified as left-tailed test or right-tailed test. If the population mean (μ) is
less than the specified value of μ0, then it is a left-tailed test for which the alternative
hypothesis can be expressed as μ < μ0.
⮚ It is a right-tailed test if the population mean (μ) is greater than the specified value of μ0 for
which the alternative hypothesis can be expressed as μ > μ0.
⮚ A two-tailed test is used when the alternative hypothesis is non-directional which means that
the values of two measures of the same kind are not equal.
⮚ A two-tailed test has a not equal sign ( ≠ ) in the alternative hypothesis. When the population
mean ( μ )is not equal to the specified value of μ0, then the alternative hypothesis can be
expressed as μ ≠ μ0.
⮚ A two-tailed test is a hypothesis test for which the rejection region lies on both end tails of
distribution, one on the left and one on the right.

Critical Region in Testing Hypothesis


Type of Test One-Tailed Test Two-Tailed Test
Level of Significance

Left-Tailed Right-Tailed

α = .05 Z < -1.645 Z > 1.645 Z > 1.96 or Z < - 1.96

α = .01 Z < - 2.33 Z > 2.33 Z > 2.575 or Z < - 2.575

α = .10 Z < -1.28 Z > 1.28 Z > 1.645 or Z < - 1.645

Terms to Remember

Test Statistics The statistics used as a basis for deciding whether the null hypothesis should
be rejected or not.
Rejection Region The set of values of the test statistic that leads to rejection of the null
hypothesis.
Non-rejection Region The set of values of the test statistic that leads to non-rejection of the
null hypothesis.
Critical Value The values of the test statistic that separate the rejection and non rejection
regions.

2
Steps in Hypothesis Testing
1. State the null hypothesis and formulate the alternative hypothesis.
2. Decide the level of significance.
3. Choose the appropriate test statistic.
4. Establish the critical region.
5. Compute the value of the statistical test.
6. Decide whether to reject the null hypothesis or not. Reject the null hypothesis if the
calculated value of the test statistic is greater than the critical value; otherwise, do not
reject the null hypothesis.
7. Draw a conclusion.

TEST OF HYPOTHESIS FOR THE DIFFERENCE BETWEEN MEANS OF TWO


NORMAL POPULATIONS

⮚ The z-test or t-test may be used in testing the difference between two means.
⮚ The z-test is used when the population standard deviation is known while the t-test is used
when the population standard deviation is unknown.
⮚ Comparison studies make use of the z-test if the population standard deviation is known or if it
is unknown but sample size is greater than or equal to 30.

One Sample Mean Test: A Sample Mean Compared with a Population

Formula:
__ __ __
Z = X – μ or Z = ( X – μ )√ n_
σ σ
√n
__
Where: X = sample mean
μ = population mean
σ = population standard deviation
n = size of the sample

Example:

1. It is claimed that the average weight of a bag of biscuit is 250 grams with a standard deviation
of 20.5 grams. Would you agree to this claim, if a random sample of 50 bags of biscuits
showed an average weight of 240 grams, using a 0.05 level of significance?

Solution:

I. H0: μ = 250 grams


H1: μ ≠ 250 grams

II. Level of Significance: α = 0.05


III. Test Statistic: Z – test since the population standard deviation is known
IV. Critical Region: Critical value of Z using a two-tailed test at 0.05 level is ±
1.96
V. Computation:
Z = ( X – μ )√ n_
σ __
= (240 – 250) √ 50
20.5
= -10 (7.07)
20.5
= -70.7
20.5
Z = - 3.45
3
VI. Decision: Reject H0 since | - 3.45 | is greater than | - 1.96 | at 0.05
level of significance
VII. Conclusion: The claim of the manufacturer that the average weight per
bag of biscuit is 250 grams is not true.

Exercise:

A certain university claims that the mean monthly salary of their college professors is PhP
18,500 with a standard deviation of Php 3,000. A researcher takes a random sample of 80 college
professors who were found to have a mean monthly salary of PhP 16,000. Do the 80 college
professors have lower salaries than the rest. Test the claim at 5% level of significance.

____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________

Two – Sample – Mean Test: A sample mean is compared to another sample mean.

Formula:
__ __
Z = ( X1 - X2 ) – (µ1 - µ2 )
/ S12 + S22
√ n1 n2

Where (µ1 - µ2 ) = expected difference which is set to zero (0).

Example:
1. Thirty-two (32) students from a Catholic school show a mean IQ of 111 with a variance of
64, while thirty (30) students from a non-Catholic school were found to have a mean IQ of
115 with a variance of 78. Is there a significant difference between their mean IQ using a
0.01 level of significance?

Solution:
Given: __
X1 = 111 S12 = 64 n1 = 32
__
X2 = 115 S22 = 78 n2 = 30

4
Solution:
__ __
I. Ho : X1 = X2
__ __
H1 : X1 ≠ X2

II. Level of Significance: α = 0.01


III. Test Statistic: Two-tailed Z- test since n>30 and variances are given
IV. Critical Value: ± 2.575
V. Computation:
Z = ( X1 - X2 ) – (µ1 - µ2 )
/ S12 + S22
√ n1 n 2

Z = (111 – 115) - 0
/ 64 + 78
√ 32 30

Z = - 1.865

VI. Decision: Do not reject Ho, reject H1 since the value of Z is less than the critical value.
VII. Conclusion: There is no significant difference between the mean IQ of students from
Catholic school and students from non-Catholic school.

Exercise:

A random sample of 42 sacks of rice from TGP Rice Store had an average weight of 48
kilograms with a standard deviation of 5 kilograms, while 55 sacks of rice from RPDC Rice
Store had an average weight of 50 kilograms with a standard deviation of 8 kilograms. Would
you say that sack of rice from TGP Rice Store has lesser content than sack of rice from RPDC
Store at 0.05 level of significance?
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
___________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________

5
SMALL SAMPLE TEST OF HYPOTHESIS FOR THE DIFFERENCE BETWEEN
MEANS

When the sample is small, that is, n < 30, and when only the sample variance is known,
t-test is used.
The use of t-test involves use of the degree of freedom of the distribution. The degree of
freedom varies according to the particular type of t-test to be used.

One Sample Mean Test. A sample mean is compared to a population mean.

Formula:
__ __ __
t=X–μ or t = ( X – μ )√ n
S S
√n
__
Where: X = sample mean
μ = population mean
S = population standard deviation
n = size of the sample

df = n – 1

Where: n = size of the sample


df = degree of freedom

Example:

It is claimed that the mean drying time of Paint X is less than or equal to 30 minutes. Would you
agree to this claim if a random sample of 20 cans show a mea drying time of 32 minutes with a
standard deviation of 3 minutes, using 0.05-level of significance?
__
Given: X = 32 S=3 μ < = 30 α = 0.05 Solution:

I. Ho μ < = 30 minutes
H1 μ > 30 minutes
II. Level of Significance: α = 0.05
III. Test Statistic t-test since n < 30 and standard deviation is
given
IV. Critical Value α = 0.05 and df = n – 1 = 20 – 1 = 19
19, 0.05 ====🡺 1.729
V. Computation: t = ( X – μ )√ n_
S __
t = (32 – 30) √ 20
3
t = 2.98

VI. Decision: Reject Ho, do not reject H1 since t value is greater than
the critical value.
VII. Conclusion: There is a significant difference between the drying time
of the sample from that of the population.

6
Exercise:

An expert encoder can type 70 words per minute. A random sample of 22 applicants took the
typing test and had an average speed of 65 words per minute with a standard deviation of 10
words per minute. Can you say that the applicants’ performance is below the standard at 0.01
level of significance?

____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________

Two Sample Mean Tests. One sample mean is compared to another sample mean.

T-Test for two independent samples:


__ __
t = ( X1 - X2 ) – (µ1 - µ2 )
S12+ S2 2
√ n1 n2

Where: X1 = mean of the first sample


X2 = mean of the second sample
S11= variance of the first sample
S2 2 = variance of the second sample
n1 = number of cases in the first sample
n2 = number of cases in the second sample
(µ1 - µ2 ) = expected difference which is set to 0.

Example:

A random sample of 14 packs of X milk showed a mean content of 480 grams with a standard
deviation of 14 grams, while a sample of 16 packs of Y milk showed a mean content of 490
grams with standard deviation of 20 grams. Using a 0.01 level of significance, is there a
significant difference between the mean content of X milk and Y milk?

Given:
X1 = 480 grams n1 = 14 s1 = 14 grams
X2 = 490 grams n2 = 16 s2 = 20 grams
7
Solution:
I. Null Hypothesis Ho X1 = X2
Alternative Hypothesis H1 X1 ≠ X2
II. Level of Significance α = 0.01
III. Test Statistic t-test since n < 30
IV. Critical Value df = n 1 + n2 - 2 = 14 + 16 – 2 = 28
CV at 28, 0.01 = ± 2.763
V. Computation:
t = ( X1 - X2 ) – (µ1 - µ2 )
S12+ S2 2
√ n1 n2
= (480 – 490) – 0
142+ 202
√ 14 16
= - 1.60
VI. Decision: Do not reject Ho. Reject H1.
VII. Conclusion: There is no significant difference between the mean content of X milk and Y
milk.

Exercise:

A random sample of 18 bottles of 500-ml C-Softdrink had a mean content of 480 ml with a
variance of 20.5 ml, while a sample of 14 bottles of 500-ml P-Softdrink had a mean content of
490 ml with a variance of 25 ml. Using 0.01 level of significance, can you say that C-Softdrink
has lesser mean content than P-Softdrink?
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_

T-Test For two dependent samples:


_
t = d - µd
S
√n
_
d = ∑d
n

_____________
2 2
S = ∑d - ( ∑d )
n
√n-1

8
Where: d = mean of difference between means
S = standard deviation
n = number of cases
∑d = sum of the mean difference
∑d2= sum of the squared difference
µd = expected difference which is set to 0
Example:

A random sample of 12 women were taken to test the effectiveness of a slimming pill. Their
weights before and after taking the slimming pill were recorded in the table below. Test the
hypothesis using the 0.01 level of significance.
Woman No. Weight in Weight in
Lbs Lbs (After)
(Before)

1 150 148

2 140 139

3 138 136

4 130 128

5 145 143

6 148 145

7 160 150

8 170 167

9 166 162

10 159 155

11 157 156
12 172 169

Solution:
I. Null Hypothesis Ho X1 = X2
Alternative Hypothesis H1 X1 ≠ X2
II. Level of Significance α = 0.01
III. Test Statistic t-test since n < 30
IV. Critical Value df = n – 1 = 12 – 1 = 11 CV at 11, 0.01 = ±3.106 V. Computation:
Woman No. Weight in Weight in d d2
Lbs Lbs (After)
(Before)

1 150 148 2 4

2 140 139 1 1

3 138 136 2 4

4 130 128 2 4

5 145 143 2 4

6 148 145 3 9

7 160 150 10 100

8 170 167 3 9

9 166 162 4 16

10 159 155 4 16

11 157 156 1 1

12 172 169 3 9

Total ∑d = 37 ∑d2= 177

_
d = ∑d = 37 = 3.08333333
n 12
_____________ _____________
S = ∑d2- ( ∑d )2= 177 - 372= 2.39
n 12
√ n - 1 √ 12 - 1

9
t = d - µd = 3.08333333 – 0 = 4.47
S 2.39
√ n √ 12

VI. Decision: Reject Ho.


VII. Conclusion: There is significant difference between the mean weights of the women before
and after taking the slimming pill, thus, the
slimming pill was effective.
Exercise:

Professor De Castro conducted a review in his Bma 102 class. He gave an examination before
and after the review and gathered the following data:
Student Score Before Score After
Review Review

1 150 148

2 140 139

3 138 136

4 130 128

5 145 143

6 148 145

7 160 150

8 170 167

9 166 162

10 159 155

Test the hypothesis at 0.01 level of significance.


____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_
____________________________________________________________________________________
_

10
11

You might also like