TEST ON
HYPOTHESIS FOR A
SINGLE SAMPLE
Engr. Hazel Joy D. Veyra, ME
Statistical inference
• It is a method concerned with making estimates of
population value.
• This method called hypothesis testing is a help in
determining how accurate the generalizations are
Hypothesis Testing
• Hypothesis testing is a decision-making process for
evaluating the claims about a population. The goal of
this process is to make judgment about the difference
between the sample statistics and a hypothesized
population parameter.
• In this process, the researcher must define the
population under study, state the hypothesis to be
investigated, give the significance level, select a sample,
collect data, perform the required test and reach a
conclusion.
z test and t test, chi-square test
• z test and t test - These are statistical tests for
hypothesis testing on means
• chi-square test is used for testing the standard
deviation.
Null and Alternative Hypothesis
• The null hypothesis, denoted as Ho is the statement of
equality indicating no existence of relationship
between the variables under study. This statement is
tested for the purpose of being accepted or rejected.
• The alternative hypothesis, denoted as Ha is also
termed as research hypothesis. It is a statement of the
expectation derived from the theory under the study.
Type I and Type II Error
• In hypothesis testing, there are four possible outcomes
Type I and Type II Error
• A type I error occurs if one rejects the null hypothesis
when it is true. It is also referred to as significance level
and denoted by the Greek symbol alpha (). The
common values of are 1%, 5% and 10%.
• A type II error occurs if one does not reject the null
hypothesis when it is false. It is denoted by a Greek
symbol beta ().
Significance Level and Confidence
Interval
• The level of significance is the maximum probability of
committing a type I error. That is, P (type I error) = .
Generally, statisticians agree on using three arbitrary
significance levels: 0.10, 0.05 and 0.01 level. That is, if the
null hypothesis is rejected, the probability of a type I
error will be 10%, 5% or 1% and the probability of correct
decision will be 90%, 95% or 99%, depending on which
level of significance is used. The values of correct
decision is the confidence interval which represents the
chance of accepting the null hypothesis when in fact it
is true.
One-sided and Two-sided
Hypothesis
• In order to state the hypothesis correctly, the researcher
must translate correctly the claim into mathematical
symbols. There are three possible sets of statistical
hypotheses.
• 1. Ho : parameter = specific value This is a two-tailed test
H1 : parameter ≠ specific value
• 2. Ho : parameter = specific value This is a left-tailed test
H1 : parameter < specific value
• 3. Ho : parameter = specific value This is a right-tailed test
H1 : parameter > specific value
P-value in Hypothesis Tests
• A P-value is the lowest level of significance at which the
observed value of the test statistic is significant. It is the
smallest level of that would lead to rejection of the Ho
with the given data.
General Procedure for Test of
Hypothesis
The following are the steps in hypothesis testing using the
fixed probability of Type I Error approach.
1. State the null and alternative hypothesis.
2. Determine the level of significance and the direction of
test. The direction of test will be based on whether the
alternative hypothesis is stated as left or right tailed test or as
two-tailed test.
3. Determine the appropriate statistical test based on the
level of measurement of the data gathered.
General Procedure for Test of
Hypothesis (cont)
4. Write the decision rule expressing on how to accept or
reject the null hypothesis.
5. Compute the test statistic and compare with the critical
value. The test statistic plays a vital role in rejecting or
accepting the null hypothesis.
6. State the decision based on the resulting computed value
when compared to the critical value.
7. Draw scientific or engineering conclusion for the given
problem.
If you will be testing the hypothesis
using Significant Testing or the P-value
approach, follow these steps:
1. State the null and alternative hypothesis.
2. Determine the appropriate statistical test based on the level
of measurement of the data gathered.
3. Compute the test statistic.
4. Compute the P-value based on the computed value of the
test statistic.
5. State the decision based on the resulting P-value and
knowledge of the scientific system.
6. Draw scientific or engineering conclusion for the given
problem.
Test on the Mean of a Normal
Distribution Variance Known
Following the steps in hypothesis testing for only single
mean, the hypothesized value referred to as the
hypothesized mean (μo).
The null hypothesis is stated as:
Ho: μ = μo
The alternative hypothesis can be written as:
H1 : μ ≠ μo
H1 : μ > μo
H1: μ < μo
Test on the Mean of a Normal
Distribution Variance Known
The decision rule is stated as follows: reject the null
hypothesis if the absolute value of the test statistic exceeds
the critical value. Otherwise, do not reject the null
hypothesis.
• To draw inference on a mean in one-population case
assuming that the entries are normally distribute and the
variance is known, Z-test is used. It can be used when the
sample size is equal or greater than 30 (n 30). The Z-
statistic, Zc, is the test statistic used to lead for the
rejection of null hypothesis in favor of the alternative
hypothesis. This is computed as:
Example 1
A random sample of 100 students enrolled in Statistics
course under Professor X shows that the average grade in
the midterm examination is 85%. Professor X claims that
the average grade of the students in the midterm is at least
80% with a standard deviation of 16%. Is there an evidence
to say that the claim is correct at 5% level of significance?
Example 2
• A manufacturer of solar lamp claims that the mean useful
life of their new product is 8 months with a standard
deviation of 0.5 month. To test this clam, a random
sample of 50 solar lamps were tested and found to have a
mean life of 7.8 months. Test the hypothesis that = 8
months against the alternative hypothesis that ≠ 8
months using 1% level of significance.
Test on the Mean of a Normal
Distribution Variance Unknown
To draw an inference on a mean in one-population case
assuming normally distributed but the variance is
unknown and the sample size is less than 30, t-test is used.
The test statistic used is the t-statistic, tc, which is
computed as follows:
Example 1
The College of Engineering of a State University gives an
entrance exam to incoming freshmen. Those who got scores
equal or higher than the set passing are accepted in the
College. The average score of the incoming freshmen was 80%
before the implementation of K to 12 education system. Due to
this implementation, the entrance exam was suspended for two
years and it is thought that the quality of the first year students
had diminished. However, with the vision, mission, goals and
objectives of the University and the College towards quality
education, the Dean wants to determine if the quality of
freshmen students has changed. He wants to know if it has
improved or diminished so a small random sample of 15
freshmen students and administers the same entrance exam.
The average score is found to be 83% with a standard deviation
of 5%. Determine whether the quality has changed using 1%
level of significance.
Test on Variance and Statistical
Deviation of a Normal Distribution
The chi-square distribution will be used to test a claim
about a single variance or standard deviation. The formula
for the Chi-square test for a single variance is given by:
Example 1
A company claims that the variance of the sugar content of
its ice cream is equal to 25 mg/oz. A sample of 20 servings
is selected, and the sugar contents is measured. The
variance of the sample is found to be 36. At 10% level of
significance, is there enough evidence to reject the claim?
Test on a Population Proportion
The problem of testing the hypothesis considers the
proportion of successes in a binomial experiment equals
some specified value. That is, the null hypothesis Ho that p
= po, where p is the parameter of the binomial distribution
is tested. The alternative hypothesis may be one of the
usual one-sided or two-sided alternatives:
𝑝<𝑝𝑜, 𝑝>𝑝𝑜 or 𝑝≠𝑝𝑜
Test on a Population Proportion
The following are the steps in testing a proportion of small
samples:
1. H0: p = po
H1: Alternatives are: 𝑝<𝑝𝑜, 𝑝>𝑝𝑜 or 𝑝≠𝑝𝑜
2. Choose a level of significance equal to
3. Test statistic: Binomial variable X with p = po.
4. Computations: Find x, the number of successes, and
compute the appropriate P-value
5. Decision: Draw appropriate conclusion based on the P-
value.
Example 1
A home developer claims that solar panels are installed in
65% of all homes being constructed today in a certain
subdivision. Would you agree with this claim if a random
survey of new homes in this subdivision shows that 8 out
of 15 had solar panels installed? Use a 0.10 level of
significance.
For large n
• Approximation is required for large sample size. When
the hypothesized value po is very close to 0 or 1, the
Poisson distribution with parameter μ = npo may be used.
However, the normal-curve approximation, with
parameters μ = npo and 2 = npoqo, is usually preferred for
large n and is very accurate as long as po is not extremely
close to 0 or 1. Using the normal approximation, the z-
value for testing p = po is given by
Example 1
A semiconductor company produces microcontrollers for
robotic applications. The company is said to demonstrate
capability to the customers if the process produces
defective items not exceeding to 5%. To determine this, a
random sample of 200 microcontrollers were tested and
found out that there are four defective items. Will you
agree that the company demonstrate process capability at
0.05 level of significance? Use P-value approach.