0% found this document useful (0 votes)
49 views10 pages

Understanding Hypothesis Testing Basics

A clear and simplified explanation of hypothesis testing concepts, including null and alternative hypotheses, p-values, significance levels, and real-world examples for easy understanding.
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)
49 views10 pages

Understanding Hypothesis Testing Basics

A clear and simplified explanation of hypothesis testing concepts, including null and alternative hypotheses, p-values, significance levels, and real-world examples for easy understanding.
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

What is Hypothesis Testing?

Hypothesis Testing is a statistical method used to make decisions or inferences about a


population based on sample data.

It helps us answer questions like:

 Is a new drug better than the old one?


 Does a new teaching method improve test scores?
 Are two manufacturing processes equally effective?

Key Concepts in Hypothesis Testing


1 Hypotheses

✅ Null Hypothesis (H₀):

 The statement of no effect or no difference.


 It assumes the status quo.

✅ Alternative Hypothesis (H₁ or Hₐ):

 The statement we are trying to find evidence for.


 It suggests a change, effect, or difference.

Example:

 H₀: The new medicine is not more effective than the old.
 H₁: The new medicine is more effective.
2️⃣ Test Statistic

A value calculated from the sample data that tells us how far the data is from the expectation
under H₀.

Examples:

 z-score
 t-score
3️⃣ p-value

The probability of getting a test statistic as extreme as the one observed, assuming H₀ is true.

✅ A small p-value (typically < 0.05) suggests the data is unlikely under H₀, so we reject H₀.
✅ A large p-value suggests there is not enough evidence to reject H₀.

4️⃣ Significance Level (α)

A threshold we set before the test to decide when to reject H₀.

 Common choices: 0.05 (5%), 0.01 (1%).

If:
p-value < α ⇒Reject H0

Else:
p-value ≥ α ⇒Fail to reject H0

5️⃣ Conclusion

Based on the p-value and α, we:

 Reject H₀ (evidence supports H₁).


 Fail to reject H₀ (not enough evidence for H₁).

Hypothesis Testing Process

1®⃣ State hypotheses (H₀, H₁)2®⃣ Choose significance level (α)3️®⃣ Calculate test statistic (z, t
, etc.)4®⃣ Find p-value5®⃣ Make a decision: Reject or Fail to reject H₀

Hypothesis Testing Flow Diagram

Here’s a diagram showing the process:


mathematica
CopyEdit
┌─────────────────────────────┐
│ State Hypotheses │
│ H₀: Null Hypothesis │
│ H₁: Alternative Hypothesis │
└──────────────┬──────────────┘

┌───────▼────────┐
│ Choose Significance │
│ Level (α, e.g., 0.05)│
└───────┬────────┘

┌───────▼─────────────┐
│ Collect Sample Data │
└───────┬─────────────┘

┌───────▼───────────────┐
│ Calculate Test Statistic │
└───────┬───────────────┘

┌───────▼───────────────┐
│ Compute p-value │
└───────┬───────────────┘

┌──────────────▼───────────────────────────────┐
│ Compare p-value to α: │
│ If p-value < α → Reject H₀ │
│ If p-value ≥ α → Fail to Reject H₀ │
└─────────────────────────────────────────────┘

Example

Suppose a company claims their new battery lasts 10 hours on average. You test 30 batteries and
find the average life is 9.5 hours.

 H₀: μ = 10 (no difference)


 H₁: μ ≠ 10 (difference exists)

If the p-value is 0.03️ and α = 0.05️:

 p-value < α ⇒ Reject H₀


 Conclusion: Evidence suggests the average battery life is different from 10 hours.

🧠 Final Tips
Term Meaning
H₀ No change/effect/difference
H₁ There is a change/effect/difference
p-value Probability of seeing the data (or more extreme) if H₀ is true
α (significance level) The threshold for deciding whether to reject H₀

Example Problem: Average Test Scores

A teacher claims that the average score of her class is 75. A researcher wants to test if the true
average is different from 75.
They collect a sample of 30 students and find:
 Sample mean (x̄) = 72
 Sample standard deviation (s) = 10

Let’s test this at a 5% significance level (α = 0.05).

🔎 Step-by-Step Hypothesis Testing


1⃣ State the Hypotheses

 Null Hypothesis (H₀):


μ=75️

 Alternative Hypothesis (H₁):


μ≠75️

(Two-tailed test: we are checking for any difference, not just an increase or decrease)
2️⃣ Choose Significance Level

α=0.05️
3️⃣ Calculate Test Statistic (t-score)

For small samples (n < 30), we use the t-test. The formula for the t-score is:
𝑥̅ − 𝜇0
𝑇= 𝑠
⁄ 𝑛

Plug in the numbers:


̅̅̅̅−75
72
𝑇= 10⁄ = −3️/1.82️5️7 ≈−1.64️3️
√30

4️⃣ Find the p-value

For a two-tailed t-test:


 Degrees of Freedom (df) = n−1=2️9
 t = -1.643

Using a t-distribution table or calculator:


p-value≈ 0.11
5. Make a Decision

Compare the p-value to α:


 p-value (0.11) > α (0.05️)

✅ So, we fail to reject H₀.


There is not enough evidence to say the true mean is different from 75.

🎯 Final Conclusion

🔹 We do not have enough evidence to reject the teacher’s claim.


🔹 The average score could still reasonably be 75.

Visual Summary
Step Description Result
1⃣ Hypotheses H₀: μ = 75️; H₁: μ ≠ 75️ -
2️⃣
α = 0.05️ -
Significance
t=−1.64️3️t = -
3️⃣ t-statistic -
1.643t=−1.643
4️⃣ p-value ≈ 0.11 -
Not enough evidence for a
5️⃣ Conclusion p > α → Fail to reject H₀
difference

What is a Two-Tailed Test?

A two-tailed test is a type of hypothesis test where we check for deviations in both directions
from a hypothesized value (e.g., higher or lower).

 It answers questions like:


o Is the mean different from a certain value?
o Is the proportion not equal to a specific number?

In a two-tailed test:

 The rejection region is split between both tails of the distribution.


 We test for both possibilities:
o μ>μ0 and
o μ<μ0
I. HYPOTHESIS TESTING

What is Hypothesis?
Hypothesis is a statement about a population developed for the purpose of testing. It is an
assumption or a statement, about one or two parameters and involving one or more than one
population. A statistical hypothesis may or may not be true. We need to decide, based on the data
in a sample, or samples, whether the stated hypothesis is true or not. If we knew all the members
of the population, then it is possible to say with certainty whether or not the hypothesis is true.
However, in most cases, it is impossible, and impractical to examine the entire population. Due to
scarcity of resources, lack of time, and tedious calculations based on a population, we can only
examine a sample that hopefully represents that population very well. So, the truth or falsity of a
statistical hypothesis is never known with certainty.

Testing Hypothesis
Testing a statistical hypothesis is a technique, or a procedure, by which we can gather some
evidence, using the data of the sample, to support, or reject, the hypothesis we have in mind.
Different steps are involved in testing a statistical hypothesis. These are discussed below:

A) The Null and Alternative Hypotheses


The first step, in testing a statistical hypothesis, is to set up a null hypothesis and an alternative
hypothesis. When we conjecture a statement, about one parameter of a population, or two
parameters of two populations, we usually keep in mind an alternative conjecture to the first
one. Only one of the conjectures can be true. So, in essence we are weighing the truth of one
conjecture against the truth of the other. This idea is the first basic principle in testing a
statistical hypothesis. For example, an experimenter may think that a newly discovered drug is
either as effective as, or better than, a currently used one. The experimenter wants to weigh the
truth of the hypothesis that the new drug is as effective as the old drug against the hypothesis
that the new drug is actually better than the old one. In statistical terminology, the first
hypothesis is called the “Null Hypothesis”, i.e. no change, no effect, or no difference, and it is
denoted by H0. The second hypothesis is called the “Alternative hypothesis”, i.e., there is a
change, and it is denoted by H1 or Ha, and it will be a statement regarding the value of a
population parameter.
Depending on the situation, hypothesis tests about a population parameter may take one of
three forms: two use inequalities in the null hypothesis; the third uses an equality in the null
hypothesis. For hypothesis tests involving a population mean, we let µ0 denote the
hypothesized value and we must choose one of the following three forms for the hypothesis
test.

a) H0: µ ≥ µ0 b) H0: µ ≤ µ0 c) H0: µ = µ0


H1: µ < µ0 H1: µ > µ0 H1: µ ≠ µ0

The first two forms (a and b) are called one-tailed tests. The third form is called a two-tailed
test. Form (a) can also be referred to as left – tailed test and (b) as right – tailed test.

B) Possible Decisions
The test procedure will lead to either one of the following decisions:
i) Reject the Null Hypothesis, H0, i.e., conclude that H0 is a false statement and this will lead
to take, or accept, that the alternative hypothesis H1 as a true statement.
ii) Do not reject the Null hypothesis, H0. This means that there is no evidence from the sample,
to disprove the null hypothesis. The non-rejection of H0 should not imply that it is true. This
is because the objective of testing a statistical hypothesis is to disprove, or reject, the null
hypothesis with a high certainty, rather than to prove it. Thus, if the statistical test rejects
H0 then we are highly certain that it is false. However, if the test does not reject H0, then we
interpret the non-rejection as that the sample does not give enough evidence to disprove the
null hypothesis. In other words, the rejection of the null hypothesis is the decisive
conclusion that we can depend on.
Based on the decision, whether to “Reject H0” or “Do Not Reject H0”, we should be careful in
stating the null and alternative hypotheses. This is due to the fact that originally, we have two
statements to be examined against each other and we may call either one of them the null
hypothesis. But since we are only highly confident about the conclusion of rejecting the null
hypothesis, we take H0 as the statement that the sample will reject. On the other hand, the
alternative hypothesis will be that statement which we hope that the data will support.
In the drug example above, the experimenter wants to prove that the new drug is better than
the old one. So, the experimenter wants to disprove the statement that the new drug is as
effective as the old one. Based on that, he should set the hypotheses as:
H0: The new drug is as effective as the old one.
H1: The new drug is more effective than the old drug.

C) Types of Errors
In making a decision about testing a statistical hypothesis, two types of errors may be
committed:
Type I Error: A Type I error has been committed if the test rejects the null hypothesis when
in fact it is true. The probability of making such an error will be denoted by α, (The Greek
letter Alpha). For sure, it is clear that 0 ≤ α ≤ 1.
Type II Error: A Type II error has been committed if the test does not reject H0 when H0 is
false. The probability of making such an error will be denoted by β, (the Greek letter Beta)
with 0 ≤ β ≤ 1. What is more important is that we do not like to make such errors with high
probabilities.
In either one of the other two cases, there is no error committed, as shown by the following
Table.
The Four Types of Actions in Hypothesis Testing

Nature State of H0
True False
Based on data
Reject H0 Type I Error Correct Decision
Do not Reject H0 Correct Decision Type II Error

Level of Significance: The probability of committing a type I error is denoted by α. It is called


the theoretical level of significance for the test. The most common used values for α are: 0.01,
0.05, or 0.10. Other values for α are at the discretion of the researcher. The probability of
committing a type II error is denoted by β. The value of 1 - β, which stands for P (rejecting H0
when H0 is false), is the power of the test. The probabilities of type I and Type II errors tell us
how good the test is. Clearly, we do not like to make a type I error with high probability, as
well as we like to make a correct decision with a very high power. The smaller these
probabilities (of type I error and Type II error) are, the better is the test.
D) The Test Statistic
The test statistic is a quantity that depends on the information, or statistics, that the sample will
provide. It is a function of the sample statistics, and the value(s) of the parameter(s) under the
null hypothesis. Thus, a statistic is a random variable until we get some values from the sample.
The numerical value of the test statistic (large or small) leads us to decide whether or not to
reject the Null Hypothesis when it is compared to the critical value(s) of the test.

E) The Critical Region or The Rejection Region (CR or RR)


The critical region is an interval, or a union of intervals, which is determined by using special
and certain distributions with the appropriate Table values. It depends on the distribution of the
test statistic when H0 is true, on the form of the alternative Hypothesis, and on the level of
significance that was set for the test.

F) Conclusion and interpretation


The final conclusion, of the test procedure, is based on whether or not the computed value of
the test statistic falls inside the critical region, or not, as follows:
i) Reject H0 if the computed value of the test statistic falls in the critical region.
ii) Do not reject H0 if the computed value of the test statistic does not fall inside the critical
region.
In either of the two cases detailed above, an interpretation and a practical statement are due in
order to answer the question that was raised before the test procedure started.

Exercise

Q1. What is the null hypothesis (H₀) typically about?

A) A difference or change exists


B) No difference or change exists
C) The population mean is unknown
D) The test statistic is always significant

Q2. In hypothesis testing, what does a p-value represent?

A) Probability that H₁ is true


B) Probability of rejecting H₀
C) Probability of observing the data (or more extreme) if H₀ is true
D) The significance level
Q3. If the p-value is less than the significance level (α), what should you do?

A) Accept H₀
B) Reject H₀
C) Fail to reject H₀
D) The test is inconclusive

Q4. What is the typical value for the significance level (α)?

A) 0.01
B) 0.05
C) 0.10
D) All of the above

Q5. If a test has a Type I error, what has happened?

A) Rejected a true H₀
B) Failed to reject a false H₀
C) Rejected a false H₁
D) The test is invalid

Q6. A Type II error means:

A) Rejected a true H₀
B) Failed to reject a false H₀
C) Rejected a false H₁
D) The p-value is large

Q7. Which of the following is an example of a two-tailed test?

A) Testing if a new drug is better than the old one


B) Testing if a coin is biased towards heads
C) Testing if the average weight of apples is different from 100g
D) Testing if a machine produces less than 10% defective items
Q8. If you fail to reject H₀, what does it mean?

A) H₀ is true
B) H₁ is false
C) There is not enough evidence to support H₁
D) H₀ is false

Q9. A test's power is defined as:

A) 1 - β (the probability of correctly rejecting a false H₀)


B) The probability of a Type I error
C) The value of the test statistic
D) The p-value of the test

You might also like