0% found this document useful (0 votes)
20 views

Testing of Hypothesis Stastistics

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

Testing of Hypothesis Stastistics

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/ 93

Chapter 3:

REYNALDO P. CANDAGANAN JR.


LYNDY M. SORIANO
RIZA JOY CANTOMAYOR
Introduction

The primary objective of statistical analysis is to use


data from a sample to make inferences about the
population from which the sample was drawn.

The mean and


µ, σ variance of
students in the
entire country?

Sample

x Mean and variance


,S of GATE scores of
all students of IIT-
KGP
Hypothesis Testing
What is Hypothesis?
• “A hypothesis is an educated prediction that can be tested”
(study.com).

• “A hypothesis is a proposed explanation for a phenomenon”


(Wikipedia).

• “A hypothesis is used to define the relationship between two


variables” (Oxford dictionary).

• “A supposition or proposed explanation made on the basis of


limited evidence as a starting point for further investigation”
(Walpole).
Testing of Hypothesis
Testing of Hypothesis:
In hypothesis testing, we decide whether to accept or
reject a particular value of a set, of particular values of a
parameter or those of several parameters. It is seen that,
although the exact value of a parameter may be unknown,
there is often same idea about the true value. The data
collected from samples helps us in rejecting or accepting our
hypothesis. In other words, in dealing with problems of
hypothesis testing, we try to arrive at a right decision about a
pre-stated hypothesis.

Definition:
A test of a statistical hypothesis is a two action
decision problem after the experimental sample values have
been obtained, the two–actions being the acceptance or
rejection of the hypothesis.
Statistical Hypothesis:

If the hypothesis is stated in terms of population parameters (such as


mean and variance), the hypothesis is called statistical hypothesis.

Example: To determine whether the wages of men and women are


equal.
A product in the market is of standard quality.
Whether a particular medicine is effective to cure a disease.

Parametric Hypothesis:

A statistical hypothesis which refers only the value of unknown


parameters of probability Distribution whose form is known is
called a parametric hypothesis.

Example: if (
X ~ N ,  2 )
then
 = 1 ,   1 ,   1 is a parametric hypothesis
STEPS IN HYPOTHESIS
TESTING
1.FORMULATE THE HYPOTHESES

H0: (Generally stated in null form)

Ha: ( A contradiction of the H0)


Null Hypothesis: H0
❖ The null hypothesis (denoted by H0) is a statement

that the value of a population parameter (such as

proportion, mean, or standard deviation) is equal to

some claimed value.

❖ States that there is no relationship between variables.

❖ We test the null hypothesis directly.

❖ Either reject H0 or fail to reject H0.


Example:
Ho : µ=5

The above statement is null hypothesis stating that the


population mean is equal to 5.

Another example can be taken to explain this. Suppose a


doctor has to compare the decease in blood pressure when
drugs A & B are used. Suppose A & B follow distribution
with mean µA and µB ,then

Ho : µA = µB
Alternative Hypothesis: H1
❖ The alternative hypothesis (denoted by H1 or Ha
or HA) is the statement that the parameter has a
value that somehow differs from the Null
Hypothesis.

❖ States that there is relationship between


variables.

❖ The symbolic form of the alternative hypothesis


must use one of these symbols: , <, >.
Types of Alternative Hypothesis
We have two kinds of alternative hypothesis:-

(a) One sided alternative hypothesis

(b) Two sided alternative hypothesis

The test related to (a) is called as ‘one – tailed’


test and those related to (b) are called as ‘two
tailed’ tests.
Ho : µ = µ0

Then

H1 : µ < µ0 or H1 : µ > µ0

One sided alternative hypothesis

H1 : µ ≠ µ0

Two sided alternative hypothesis

Note about Forming Your Own Claims (Hypotheses)

If you are conducting a study and want to use a hypothesis


test to support your claim, the claim must be worded so that
it becomes the alternative hypothesis.
2. Set the level of significance to be
adapted and state the decision rule.
1.Deciding on a criterion for accepting or rejecting the
null hypothesis.
2.Significance level refers to the percentage of sample
means that is outside certain prescribed limits. E.g
testing a hypothesis at 5% level of significance means
 That we reject the null hypothesis if it falls in the two
regions of area 0.025.
 Do not reject the null hypothesis if it falls within the
region of 0.95.
3.The higher the level of significance, the higher is the
probability of rejecting the null hypothesis when it is
true. ( acceptance region narrows)
3. Choose an Appropriate Test Statistics
 In choosing an appropriate statistical tool, consider the
following:
a.Level of measurement of Data (whether nominal,ordinal,
interval, ratio )

b.Objectives/Purpose of the Study


( whether the researcher would like to compare the sample
to some population value or compare two or more groups)
Test Statistic
The test statistic is a value used in making a
decision about the null hypothesis, and is found by
converting the sample statistic to a score with the
assumption that the null hypothesis is true.

The statistic that is compared with the parameter in


the null hypothesis is called the test statistic.
x − 0
t cal = ~ t ( n−1) df
s2 / n
Test statistic for mean
Critical Region
The critical region (or rejection region) is the set of
all values of the test statistic that cause us to reject
the null hypothesis. Acceptance region
Accept H0 ,if the sample
mean falls in this region

95 % of area

Acceptance and
0.025 of area 0.025 of area
rejection regions
in case of a two- µH 0

tailed test with 5% Rejection region


significance level. Reject H0 ,if the sample mean falls
in either of these regions
Significance Level
The significance level (denoted by )
is the probability that the test
statistic will fall in the critical region
when the null hypothesis is actually
true. Common choices for  are 0.05,
0.01, and 0.10.
Critical Value

A critical value is any value that separates the


critical region (where we reject the null
hypothesis) from the values of the test
statistic that do not lead to rejection of the null
hypothesis. The critical values depend on the
nature of the null hypothesis, the sampling
distribution that applies, and the significance
level .
c. Whether the samples are
related or independent
Two-tailed, Right-tailed,
Left-tailed Tests
The tails in a distribution are the extreme
regions bounded by critical values.
d. Assumptions on the distribution of the data
Two-tailed Test
H0: =  is divided equally between the
two tails of the critical region
H1: 
Means less than or greater than
Right-tailed Test

H0: =
H1: >
Points Right
Left-tailed Test

H0: =
H1: <
Points Left
4. Compute the Test Statistics
P-Value
The P-value (or p-value or probability value)
is the probability of getting a value of the test
statistic that is at least as extreme as the one
representing the sample data, assuming that
the null hypothesis is true. The null
hypothesis is rejected if the P-value is very
small, such as 0.05 or less.
Two-tailed Test
If the alternative hypothesis contains the not-equal-to symbol
(), the hypothesis test is a two-tailed test. In a two-tailed
1
test, each tail has an area of P.
2

H0: μ = k
Ha: μ  k
P is twice the
P is twice the area to the right
area to the left of of the positive
the negative test test statistic.
statistic.

-3 -2 -1 0 1 2 3
Test Test
statistic statistic
Right-tailed Test

If the alternative hypothesis contains the greater-than


symbol (>), the hypothesis test is a right-tailed test.

H0: μ = k
P is the area to
Ha: μ > k the right of the test
statistic.

-3 -2 -1 0 1 2 3
Test
statistic
Left-tailed Test

If the alternative hypothesis contains the less-than


inequality symbol (<), the hypothesis test is a left-tailed
test.

H0: μ = k

Ha: μ < k
P is the area to
the left of the test
statistic.

-3 -2 -1 0 1 2 3
Test
statistic
5. Making a Decision

We always test the null hypothesis.


The initial conclusion will always be
one of the following:

1. Reject the null hypothesis.

2. Fail to reject the null hypothesis.


Decision Criterion

Traditional method

Reject H0 if the test statistic falls


within the critical region.

Fail to reject H0 if the test statistic


does not fall within the critical
region.
Decision Criterion
P-value method

Reject H0 if the P-value   (where 


is the significance level, such as
0.05).

Accept H0 if the P-value > .


Decision Criterion
Confidence Intervals

Because a confidence interval estimate of a


population parameter contains the likely
values of that parameter, reject a claim that
the population parameter has a value that is
not included in the confidence interval.
There may be four possible situations that arise
in any test procedure which have been
summaries are given below:

Actual Truth of H0

Decision
H0 is true H0 is false

Accept H0 Correct Decision Type II Error

Reject H0 Type I Error Correct Decision


6. Interpreting a Decision
Example:
H0: (Claim) A cigarette manufacturer claims that less
than one-eighth of the US adult population smokes
cigarettes.

If H0 is rejected, you should conclude “there is


sufficient evidence to indicate that the manufacturer’s
claim is false.”

If you fail to reject H0, you should conclude “there is


not sufficient evidence to indicate that the
manufacturer’s claim is false.”
Hypothesis Testing Procedures


The one –sample z-Test and t- Test
 The one-sample z-test and t- test is the appropriate
parametric test to use when the researcher wants to
compare a sample mean with the population mean.
 The z- test is used when the sample size is large ( n ≥ 30) .
 The t- test is used when the sample size is small ( n < 30).

 The Formula for computing the z statistic is


Where:
- X̄ is the sample mean
- μ is the population mean
- σ is the population standard deviation
- n is the size of the sample
Example:
 Problem: A teacher in a laboratory school hypothesized that
their senior high school students ( N = 78 ) would achieve a
mean score of 87 in the 2009 NAT. The actual mean of the
group, however, was 87.67 with a standard deviation of 1.31.
Was the teacher correct with her prediction? Test at .05 level.
Solution:
1. Ho: The percentile mean of the group is equal to 87 ( µ = 87 )
Ha: The percentile mean of the group is greater than 87 ( µ >
87 )
2. α = .05
3.Test statistic One sample z- test ( one tailed )
We use the z-test since sample size is large. We will use the
one tailed test since Ha is directional.
The tabular value Z. 05 = 1.645 (𝑜𝑛𝑒 𝑡𝑎𝑖𝑙𝑒𝑑)
Decision Rule (DR): Reject Ho if Zc𝑜𝑚𝑝 > 𝟏. 𝟔𝟒𝟓, 𝒐𝒕𝒉𝒆𝒓𝒘𝒊𝒔𝒆, 𝑨𝒄𝒄𝒆𝒑𝒕 𝑯𝒐.
4.Computation

Where:
X̄ =87.67
μ =87
σ =1.31
n =78

5.Decision: Since the computed value of 4.51, exceeded the


table value of 1.645; we reject Ho and accept Ha.
The t- test for Independent Samples
 The t- test for independent samples is appropriate
to use when comparing means of two independent
groups. It is applicable when the sample size is
small. We compute using the formula:
Example:
 A teacher wanted to compare the first grading test
performance of her section 1 and section 2 students in HS
Math 4. The scores of the students in a 40 – item test are
given below:

 Is there a significance difference between the mean scores


of the two groups? Test at 0.05 level.
1.Ho: There is no significant difference between the mean scores of the
two groups.
Ha: There is significant difference between the mean scores of the
two groups.

2. σ = .05

3. Test statistic: t-test for independent samples ( two tailed )


We use t – test for independent samples for comparing means of two
different groups. We use a two tailed test since Ha is non-directional.
4. Computations:
Find the total scores for each group and the sum of the
squares of scores in each group.
5.Decision:
From the t-test distribution table we find that t. 05 (𝑡𝑤𝑜 𝑡𝑎𝑖𝑙𝑒𝑑, 𝑑𝑓 = 21
= 2.08. Since the computed t-value of 1.14 did not exceed the tabular value
of 2.08,the Ho is accepted.
Note: We do not need a table value when a computer printout is at hand.
We simply compare the p-value (sig) with σ and we reject Ho if p < σ , otherwise,
we accept Ho. In this case, since p > .05 ( p=.267), we accept Ho.)
6. Conclusion: There is no significant difference between the mean scores of the
two groups. This means that the performances of the two groups are just the same.
The t- test for Dependent Samples

 The t- test for dependent ( or related ) samples is


an appropriate test for evaluating a certain
program or treatment. It is used to test if a
significant difference exists between means before
and after treatment ( Pretest and Posttest) or
when we compare results of match-paired groups.
Example:
A mathematics teacher wanted to determine the
effectiveness of using new method of teaching a lesson in
mathematics. Before teaching the subject matter he gave a
20- item test to the group and after that, he exposed the
group to the new method. At the end of the unit he gave the
same test to the group. The data collected are reflected in the
table that follows

Question:
Is there a significant difference between the pretest mean
score and the posttest mean score of the experimental
group? Test at .05 level.
1. Ho: There is no significant difference between the pretest
and posttest mean scores of the experimental group?
2.Ha: There is a significant difference between the pretest
and posttest mean scores of the experimental group?
3. σ = .05
4. Test statistic t – test dependent samples
The t-test for dependent samples is appropriate for
pretest-posttest designs. It is used to determine if a
significant difference exists between the pretest and
posttest means of the experimental group.
5. Computations
a. Find the differences between the pretest and posttest
scores of each student and find their algebraic sum.
b. Square each differences and find the sum
Dependent or Paired Samples Test Result
(Using SPSS statistical package software)
Note: that t-value in the table is the same as the computed t above.

6.Decision:
From t- distribution table, t .05,8 = 2.306 ( two –tailed), so our decision
rule is
DR: Reject Ho if tcomputed > 2.306, otherwise Accept Ho.
(Disregard the sign when interpreting the computed t)
Since the computed t- value of 5.625 exceeded the table value of t. 05 for 8
degrees of freedom, Ho is rejected.(There is evidence to support the
rejection of Ho) or since the p-value (sig) of .000* is less than .05, the Ho is
rejected.
* A p-value of .000 is not equal to 0.It means that it is very, very small.
6.Conclusion:
Since Ho is rejected, there is a significant
difference between the pretest and posttest
mean scores of the experimental group.
Since the posttest mean is higher than the
pretest mean score, it implies that the
performance of the group improved. It
means further, that the new method of
teaching was effective.
Introduction
Symbols
Formula
Formula
Formula
X^2 Test for a
Variance or
Standard
Deviation
# X^2 Test for a Variance or
Standard Deviation
In mathematics, “X squared” (x^2) refers to a number, or variable, being
multiplied by itself. If 'x' represents 3, then x^2 is 3 * 3, or 9. Multiplication of
numbers is a fundamental arithmetic operation, but squaring expands this
concept by repeating multiplication with the same number.
Reference:https://brighterly.com/math/x-
squared/#:~:text=In%20mathematics%2C%20%E2%80%9CX%20squared%E2%80%9D,multiplication%20with%20the%20same%20number.

Chi-square test is a non-parametric test (a non-parametric statistical test is a


test whose model does not specify conditions about the parameter of the
population from which the sample is drawn.). It is used for identifying the
relationship between a categorical variable and denoted by χ2.
Reference:https://www.datacamp.com/tutorial/chi-square-test-in-spreadsheets
# X^2 Test for a Variance or
Standard Deviation
# X^2 Test for a Variance or
Standard Deviation
Chi-Squared Tests are most commonly used in hypothesis testing. A
hypothesis is an assumption that any given condition might be true,
which can be tested afterwards. The Chi-Square test estimates the size
of inconsistency between the expected results and the actual results
when the size of the sample and the number of variables in the
relationship is mentioned.
These tests use degrees of freedom to determine if a particular null
hypothesis can be rejected based on the total number of observations
made in the experiments. Larger the sample size, more reliable is the
result.

There are two main types of Chi-Square tests namely -


1.Independence
2.Goodness-of-Fit
References:
https://www.youtube.com/watch?v=BSUxujOJWok&ab_channel=AngieTeaches
# X^2 Test for a Variance or
Standard Deviation
Goodness-Of-Fit
In statistical hypothesis testing, the Chi-Square Goodness-of-Fit test
determines whether a variable is likely to come from a given
distribution or not. We must have a set of data values and the idea of
the distribution of this data. We can use this test when we have value
counts for categorical variables. This test demonstrates a way of deciding
if the data values have a “ good enough” fit for our idea or if it is a
representative sample data of the entire population.
For Example-
Suppose we have bags of balls with five different colours in each bag. The
given condition is that the bag should contain an equal number of balls of
each colour. The idea we would like to test here is that the proportions of
the five colours of balls in each bag must be exact.

References:
https://www.youtube.com/watch?v=BSUxujOJWok&ab_channel=AngieTeaches
# X^2 Test for a Variance or
Standard Deviation
What is a Chi-square test?
A Chi-square test is a hypothesis testing
method. Two common Chi-square tests
involve checking if observed frequencies in
one or more categories match expected
frequencies.
Is a Chi-square test the same as a χ² test?
Yes, χ is the Greek symbol Chi.
Reference; https://www.jmp.com/en_ph/statistics-knowledge-portal/chi-
square-test.html
# X^2 Test for a Variance or
Standard Deviation

References:
https://www.yo
utube.com/wat
ch?v=BSUxujOJ
Wok&ab_chann
el=AngieTeache
s
# X^2 Test for a Variance or
Standard Deviation

References:
https://www.yo
utube.com/wat
ch?v=BSUxujOJ
Wok&ab_channe
l=AngieTeaches
# X^2 Test for a Variance or
Standard Deviation
Independence
The Chi-Square Test of Independence is a derivable ( also known as
inferential ) statistical test which examines whether the two sets of
variables are likely to be related with each other or not. This test is used
when we have counts of values for two nominal or categorical variables and is
considered as non-parametric test. A relatively large sample size and
independence of observations are the required criteria for conducting this
test.
For Example-
In a movie theatre, suppose we made a list of movie genres. Let us consider
this as the first variable. The second variable is whether or not the people
who came to watch those genres of movies have bought snacks at the
theatre. Here the null hypothesis is that the genre of the film and whether
people bought snacks or not are unrelatable. If this is true, the movie genres
don’t impact snack sales.

References: https://www.simplilearn.com/tutorials/statistics-tutorial/chi-square-test
# X^2 Test for a Variance or
Standard Deviation
The Chi-Square Test of Independence

Reference
:https://www.youtube.com/wa
tch?v=NDhmMH25AC4&t=322s&
ab_channel=StevenBradburn
# X^2 Test for a Variance or
Standard Deviation
The Chi-Square Test of Independence

Reference
:https://www.youtube.com/wa
tch?v=NDhmMH25AC4&t=322s&
ab_channel=StevenBradburn
# X^2 Test for a Variance or
Standard Deviation
The Chi-Square Test of Independence

Reference
:https://www.youtube.com/wa
tch?v=NDhmMH25AC4&t=322s&
ab_channel=StevenBradburn
# X^2 Test for a Variance or
Standard Deviation
The Chi-Square Test of Independence

Reference
:https://www.youtube.com/wa
tch?v=NDhmMH25AC4&t=322s&
ab_channel=StevenBradburn
# X^2 Test for a Variance or
Standard Deviation
The Chi-Square Test of Independence

Reference
:https://www.youtube.com/wa
tch?v=NDhmMH25AC4&t=322s&
ab_channel=StevenBradburn
# X^2 Test for a Variance or
Standard Deviation
Who Uses Chi-Square Analysis?
Chi-square is most commonly used by researchers who are studying
survey response data because it applies to categorical variables.
Demography, consumer and marketing research, political science, and
economics are all examples of this type of research.

4) What is the difference between t-test and chi-square?


The t-test and the chi-square test are two different statistical tests used for
different types of data. The t-test is used to compare the means of two
groups and is suitable for continuous numerical data. On the other hand,
the chi-square test is used to examine the association between two
categorical variables. It is applicable to discrete, categorical data. So, the
choice between the t-test and chi-square test depends on the nature of the
data being analyzed.

References: https://www.simplilearn.com/tutorials/statistics-tutorial/chi-square-test
Referrence:
https://www.yout
# X^2 Test for a Variance or ube.com/watch?v
=v88myC_Ji5M&t=
Standard Deviation 135s&ab_channel
=WhatsUpDude
# X^2 Test for a Variance or
Standard Deviation
# X^2 Test for a Variance or
Standard Deviation
# X^2 Test for a Variance or
Standard Deviation
# X^2 Test for a Variance or
Standard Deviation
# X^2 Test for a Variance or
Standard Deviation
# X^2 Test for a Variance or
Standard Deviation
# X^2 Test for a Variance or
Standard Deviation
# X^2 Test for a Variance or
Standard Deviation

You might also like