Hypothesis Testing

Table of Contents


Introduction to Hypothesis Testing

Hypothesis testing is a fundamental statistical method used to determine whether there is enough evidence to reject a null hypothesis ($H_0$) in favor of an alternative hypothesis ($H_1$). It is commonly used in various fields like medicine, business, psychology, and social sciences to test claims or assumptions about a population parameter based on sample data.

The main objective of hypothesis testing is to make inferences about a population using data from a sample.


Null Hypothesis ($H_0$) and Alternative Hypothesis ($H_1$)

  • Null Hypothesis ($H_0$): The null hypothesis represents the assumption that there is no effect or no difference. It is a statement of no change, no association, or no effect, which we aim to test.Example:
    In a study testing whether a new drug is effective, the null hypothesis might be, “$H_0$: The new drug has no effect.”
  • Alternative Hypothesis ($H_1$): The alternative hypothesis is what you want to prove. It suggests that there is an effect, difference, or association.Example:
    “$H_1$: The new drug has a significant effect.”

Types of Hypotheses

  1. Simple Hypothesis: A hypothesis that specifies the exact value of a parameter.
    Example: “$H_0$: The mean height of adult males is 175 cm.”
  2. Composite Hypothesis: A hypothesis that specifies a range of values for a parameter.
    Example: “$H_1$: The mean height of adult males is not 175 cm.”

One-Tailed vs Two-Tailed Tests

  • One-Tailed Test: A one-tailed test checks for an effect in only one direction (either greater than or less than a specified value).Example:
    “$H_1$: The mean test score is greater than 70.”
  • Two-Tailed Test: A two-tailed test checks for an effect in both directions (greater or less than a specified value).Example:
    “$H_1$: The mean test score is not equal to 70.”

Steps in Hypothesis Testing

  1. State the Hypotheses:
    Set up the null hypothesis ($H_0$) and alternative hypothesis ($H_1$).
  2. Set the Level of Significance ($\alpha$):
    Choose a significance level, commonly $\alpha = 0.05$, to determine the probability of rejecting $H_0$ when it is true.
  3. Select the Appropriate Test:
    Choose the correct statistical test based on the type of data and sample size (e.g., Z-test, T-test, Chi-Square test).
  4. Calculate the Test Statistic:
    Compute the test statistic based on the sample data. This could be a Z-score, T-score, or Chi-square value.
  5. Find the P-value:
    Determine the probability of observing the test statistic if the null hypothesis is true.
  6. Make a Decision:
    Compare the P-value with the level of significance. If the P-value is less than $\alpha$, reject the null hypothesis.

Level of Significance (Alpha)

The level of significance ($\alpha$) is the threshold for determining whether the null hypothesis should be rejected. A commonly used value for $\alpha$ is 0.05, which means there is a 5% chance of rejecting $H_0$ when it is true.


Type I and Type II Errors

  • Type I Error ($\alpha$): Occurs when the null hypothesis is rejected when it is true. This is also known as a “false positive.”Example:
    Concluding that a drug is effective when it is not.
  • Type II Error ($\beta$): Occurs when the null hypothesis is not rejected when it is false. This is also known as a “false negative.”Example:
    Concluding that a drug is not effective when it actually is.

Power of a Test

The power of a statistical test is the probability that it correctly rejects the null hypothesis when the alternative hypothesis is true. It is given by $1 – \beta$, where $\beta$ is the probability of making a Type II error. A high-powered test has a greater likelihood of detecting a true effect.


P-value and Its Interpretation

The P-value is the probability of obtaining the observed result, or one more extreme, under the assumption that the null hypothesis is true. It quantifies the strength of the evidence against the null hypothesis.

  • If P-value < $\alpha$, reject the null hypothesis.
  • If P-value > $\alpha$, fail to reject the null hypothesis.

Critical Value Approach

In the critical value approach, you compare the test statistic to critical values that correspond to the level of significance ($\alpha$). If the test statistic is greater than the critical value, you reject the null hypothesis.


Confidence Intervals and Hypothesis Testing

A confidence interval provides a range of values for an unknown parameter. If the hypothesized parameter value falls outside the confidence interval, the null hypothesis can be rejected.

Example:
If a 95% confidence interval for the population mean is (30, 50), then a null hypothesis claiming the mean is 60 would be rejected.


Z-test for Population Mean

A Z-test is used when the sample size is large ($n > 30$) and the population variance is known.

Formula:
$ Z = \frac{\bar{x} – \mu}{\sigma / \sqrt{n}} $

Where:

  • $\bar{x}$ = sample mean
  • $\mu$ = population mean
  • $\sigma$ = population standard deviation
  • $n$ = sample size

Example:
Is the mean weight of a population 70 kg based on a sample of 50 people with a mean of 72 kg and a standard deviation of 8 kg?

Answer:
Step 1: Given Data:
$ \bar{x} = 72, \mu = 70, \sigma = 8, n = 50 $
Step 2: Solution:
$ Z = \frac{72 – 70}{8 / \sqrt{50}} = 1.77 $
Step 3: Final Answer:
Since $Z = 1.77$, which is less than the critical value for $\alpha = 0.05$, we fail to reject the null hypothesis.


T-test for Population Mean

A T-test is used when the sample size is small ($n < 30$) and the population variance is unknown.

Formula:
$ T = \frac{\bar{x} – \mu}{s / \sqrt{n}} $

Where:

  • $s$ = sample standard deviation

Paired vs Independent T-tests

  • Paired T-test: Used when comparing two related samples, such as pre-test and post-test scores for the same individuals.
  • Independent T-test: Used when comparing two independent samples, such as test scores of two different groups.

Chi-Square Test for Goodness of Fit

The Chi-square goodness of fit test is used to determine if a sample matches a population.

Formula:
$ \chi^2 = \sum \frac{(O_i – E_i)^2}{E_i} $

Where:

  • $O_i$ = observed frequency
  • $E_i$ = expected frequency

Chi-Square Test for Independence

The Chi-square test for independence tests whether two categorical variables are independent of each other.


ANOVA (Analysis of Variance)

ANOVA is used to compare the means of three or more groups.


F-test for Variances

An F-test is used to compare two variances.


Non-Parametric Tests

When the assumptions of parametric tests (such as normality) are violated, non-parametric tests are used.

  • Wilcoxon Signed-Rank Test: A non-parametric test used as an alternative to the paired T-test.
  • Mann-Whitney U Test: Used to compare two independent samples when normality is not assumed.
  • Kruskal-Wallis Test: A non-parametric alternative to ANOVA.

Assumptions of Hypothesis Testing

  1. The data is randomly sampled.
  2. The sample is representative of the population.
  3. For parametric tests, the population follows a normal distribution.

Choosing the Right Test for Your Data

  • Use a Z-test or T-test for testing means.
  • Use a Chi-square test for categorical data.
  • Use ANOVA when comparing more than two groups.

Applications of Hypothesis Testing in Real Life

  • Medicine: Testing the effectiveness of a new drug.
  • Business: Comparing the performance of different marketing campaigns.
  • Education: Testing whether a new teaching method improves test scores.

FAQs

  1. What is the purpose of hypothesis testing?
    • Hypothesis testing helps us make decisions about a population parameter based on sample data.
  2. What is the difference between a one-tailed and two-tailed test?
    • A one-tailed test looks for an effect in one direction, while a two-tailed test looks for effects in both directions.
  3. How do you choose between a Z-test and a T-test?
    • Use a Z-test when the population variance is known and the sample size is large. Use a T-test when the population variance is unknown and the sample size is small.
  4. What is a Type I error?
    • A Type I error occurs when we reject the null hypothesis when it is actually true.
  5. Why is the P-value important in hypothesis testing?
    • The P-value helps determine the strength of the evidence against the null hypothesis. A small P-value indicates strong evidence to reject $H_0$.

Question And Answer Library

Example 1: Z-Test for Population Mean

Problem:
A sample of 100 students has an average test score of 82, with a population standard deviation of 10. Test the hypothesis that the average score of all students is 80 at a 0.05 significance level.

Step 1: Given Data:
$\bar{x} = 82$, $\mu = 80$, $\sigma = 10$, $n = 100$, $\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Z-test formula:
$ Z = \frac{\bar{x} – \mu}{\sigma / \sqrt{n}} $
$ Z = \frac{82 – 80}{10 / \sqrt{100}} = 2 $

Find the critical value for a two-tailed test at $\alpha = 0.05$:
$ Z_{critical} = \pm 1.96 $

Step 3: Final Answer:
Since $Z = 2 > Z_{critical} = 1.96$, reject the null hypothesis. The average score is significantly different from 80.


Example 2: T-Test for Population Mean

Problem:
A sample of 20 people has an average weight of 70 kg with a sample standard deviation of 8 kg. Test the hypothesis that the population mean is 75 kg at a 0.05 significance level.

Step 1: Given Data:
$\bar{x} = 70$, $\mu = 75$, $s = 8$, $n = 20$, $\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the T-test formula:
$ T = \frac{\bar{x} – \mu}{s / \sqrt{n}} $
$ T = \frac{70 – 75}{8 / \sqrt{20}} = -2.79 $

Degrees of freedom $df = n – 1 = 19$. The critical value for a two-tailed test at $\alpha = 0.05$ is $T_{critical} = \pm 2.093$.

Step 3: Final Answer:
Since $T = -2.79 < T_{critical} = -2.093$, reject the null hypothesis. The population mean is significantly different from 75.


Example 3: One-Tailed Z-Test for Population Proportion

Problem:
In a sample of 500 voters, 260 are in favor of a new policy. Test the hypothesis that more than half the voters are in favor of the policy at a 0.01 significance level.

Step 1: Given Data:
$n = 500$, $p = 260/500 = 0.52$, $\pi_0 = 0.5$, $\alpha = 0.01$

Step 2: Solution:
The test statistic is calculated using the Z-test formula for proportions:
$ Z = \frac{p – \pi_0}{\sqrt{\frac{\pi_0 (1 – \pi_0)}{n}}} $
$ Z = \frac{0.52 – 0.5}{\sqrt{\frac{0.5(1 – 0.5)}{500}}} = 0.894 $

The critical value for a one-tailed test at $\alpha = 0.01$ is $Z_{critical} = 2.33$.

Step 3: Final Answer:
Since $Z = 0.894 < Z_{critical} = 2.33$, fail to reject the null hypothesis. There is not enough evidence to suggest that more than half the voters are in favor.


Example 4: Chi-Square Test for Goodness of Fit

Problem:
In a survey, the observed frequencies of responses are as follows: A = 25, B = 30, C = 45. The expected frequencies are A = 33, B = 33, C = 34. Test the hypothesis that the observed frequencies fit the expected distribution at a 0.05 significance level.

Step 1: Given Data:
$O_A = 25$, $O_B = 30$, $O_C = 45$, $E_A = 33$, $E_B = 33$, $E_C = 34$, $\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Chi-square formula:
$ \chi^2 = \sum \frac{(O_i – E_i)^2}{E_i} $
$ \chi^2 = \frac{(25 – 33)^2}{33} + \frac{(30 – 33)^2}{33} + \frac{(45 – 34)^2}{34} = 5.12 $

Degrees of freedom $df = 3 – 1 = 2$. The critical value for $\alpha = 0.05$ is $\chi^2_{critical} = 5.991$.

Step 3: Final Answer:
Since $\chi^2 = 5.12 < \chi^2_{critical} = 5.991$, fail to reject the null hypothesis. The observed frequencies fit the expected distribution.


Example 5: Paired T-Test

Problem:
A group of 10 students took a pre-test and a post-test. Their average improvement in scores was 6 points, with a standard deviation of 2 points. Test the hypothesis that the post-test scores are higher at a 0.05 significance level.

Step 1: Given Data:
$\bar{d} = 6$, $s_d = 2$, $n = 10$, $\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Paired T-test formula:
$ T = \frac{\bar{d}}{s_d / \sqrt{n}} $
$ T = \frac{6}{2 / \sqrt{10}} = 9.486 $

Degrees of freedom $df = n – 1 = 9$. The critical value for a one-tailed test at $\alpha = 0.05$ is $T_{critical} = 1.833$.

Step 3: Final Answer:
Since $T = 9.486 > T_{critical} = 1.833$, reject the null hypothesis. There is significant evidence that the post-test scores are higher.


Example 6: Two-Tailed T-Test for Independent Samples

Problem:
Two groups of students are given different teaching methods. Group 1 has 15 students with an average score of 78 and a standard deviation of 5. Group 2 has 12 students with an average score of 85 and a standard deviation of 6. Test if there is a significant difference in scores at a 0.01 significance level.

Step 1: Given Data:
$n_1 = 15$, $\bar{x}_1 = 78$, $s_1 = 5$
$n_2 = 12$, $\bar{x}_2 = 85$, $s_2 = 6$, $\alpha = 0.01$

Step 2: Solution:
The test statistic is calculated using the T-test formula for independent samples:
$ T = \frac{\bar{x}_1 – \bar{x}_2}{\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}} $
$ T = \frac{78 – 85}{\sqrt{\frac{5^2}{15} + \frac{6^2}{12}}} = -3.58 $

Degrees of freedom are approximated as $df = 25$. The critical value for a two-tailed test at $\alpha = 0.01$ is $T_{critical} = \pm 2.787$.

Step 3: Final Answer:
Since $T = -3.58 < T_{critical} = -2.787$, reject the null hypothesis. There is a significant difference in the scores between the two groups.


Example 7: Z-Test for Proportion

Problem:
In a sample of 400 employees, 240 prefer to work remotely. Test the hypothesis that more than 50% of employees prefer to work remotely at a 0.05 significance level.

Step 1: Given Data:
$n = 400$, $p = \frac{240}{400} = 0.6$, $\pi_0 = 0.5$, $\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Z-test for proportions:
$ Z = \frac{p – \pi_0}{\sqrt{\frac{\pi_0(1 – \pi_0)}{n}}} $
$ Z = \frac{0.6 – 0.5}{\sqrt{\frac{0.5(1 – 0.5)}{400}}} = 4 $

The critical value for a one-tailed test at $\alpha = 0.05$ is $Z_{critical} = 1.645$.

Step 3: Final Answer:
Since $Z = 4 > Z_{critical} = 1.645$, reject the null hypothesis. More than 50% of employees prefer to work remotely.


Example 8: ANOVA Test

Problem:
Three different diets are tested on groups of 10 people. The mean weight loss for Diet 1 is 5 kg, Diet 2 is 6 kg, and Diet 3 is 7 kg. The sum of squares between groups is 20, and the sum of squares within groups is 30. Test whether there is a significant difference in weight loss at a 0.05 significance level.

Step 1: Given Data:
$SSB = 20$, $SSW = 30$, $n = 30$, $\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the F-test formula:
$ F = \frac{MSB}{MSW} = \frac{SSB / (k – 1)}{SSW / (n – k)} $
$ F = \frac{20 / 2}{30 / 27} = 9 $

The critical value for $df_1 = 2$, $df_2 = 27$, and $\alpha = 0.05$ is $F_{critical} = 3.35$.

Step 3: Final Answer:
Since $F = 9 > F_{critical} = 3.35$, reject the null hypothesis. There is a significant difference in weight loss between the three diets.


Example 9: Chi-Square Test for Independence

Problem:
A survey of 100 people is conducted to test whether gender is associated with preference for a new product. The observed data are as follows:

Product AProduct B
Male3020
Female1040

Test the hypothesis that gender and product preference are independent at a 0.05 significance level.

Step 1: Given Data:
The observed data are provided in the table, with a total sample size of 100.
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Chi-square formula for independence:
$ \chi^2 = \sum \frac{(O_i – E_i)^2}{E_i} $

First, we calculate the expected frequencies:

  • Total for males: 50
  • Total for females: 50
  • Total for Product A: 40
  • Total for Product B: 60

Expected frequency for Male, Product A:
$ E_{Male,A} = \frac{(50 \times 40)}{100} = 20 $

Expected frequency for Male, Product B:
$ E_{Male,B} = \frac{(50 \times 60)}{100} = 30 $

Expected frequency for Female, Product A:
$ E_{Female,A} = \frac{(50 \times 40)}{100} = 20 $

Expected frequency for Female, Product B:
$ E_{Female,B} = \frac{(50 \times 60)}{100} = 30 $

Now, calculate the Chi-square statistic: $ \chi^2 = \frac{(30 – 20)^2}{20} + \frac{(20 – 30)^2}{30} + \frac{(10 – 20)^2}{20} + \frac{(40 – 30)^2}{30} = 5 + 3.33 + 5 + 3.33 = 16.66 $

Degrees of freedom $df = (2 – 1)(2 – 1) = 1$.
The critical value for $\alpha = 0.05$ is $\chi^2_{critical} = 3.841$.

Step 3: Final Answer:
Since $ \chi^2 = 16.66 > \chi^2_{critical} = 3.841 $, reject the null hypothesis. There is significant evidence to suggest that gender and product preference are associated.


Example 10: Z-Test for Population Mean

Problem:
A researcher wants to test whether the average lifespan of a certain breed of dog is 12 years. A sample of 36 dogs shows a mean lifespan of 13 years with a population standard deviation of 2 years. Test the hypothesis at a 0.01 significance level.

Step 1: Given Data:
$\bar{x} = 13$, $\mu = 12$, $\sigma = 2$, $n = 36$, $\alpha = 0.01$

Step 2: Solution:
The test statistic is calculated using the Z-test formula:
$ Z = \frac{\bar{x} – \mu}{\sigma / \sqrt{n}} $
$ Z = \frac{13 – 12}{2 / \sqrt{36}} = 3 $

The critical value for a two-tailed test at $\alpha = 0.01$ is $Z_{critical} = \pm 2.576$.

Step 3: Final Answer:
Since $Z = 3 > Z_{critical} = 2.576$, reject the null hypothesis. There is significant evidence that the average lifespan is different from 12 years.


Example 11: T-Test for Population Mean

Problem:
A biologist wants to test whether the average length of a species of fish is 20 cm. A sample of 16 fish has an average length of 21 cm with a standard deviation of 1.5 cm. Test the hypothesis at a 0.05 significance level.

Step 1: Given Data:
$\bar{x} = 21$, $\mu = 20$, $s = 1.5$, $n = 16$, $\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the T-test formula:
$ T = \frac{\bar{x} – \mu}{s / \sqrt{n}} $
$ T = \frac{21 – 20}{1.5 / \sqrt{16}} = 2.67 $

Degrees of freedom $df = n – 1 = 15$. The critical value for a two-tailed test at $\alpha = 0.05$ is $T_{critical} = \pm 2.131$.

Step 3: Final Answer:
Since $T = 2.67 > T_{critical} = 2.131$, reject the null hypothesis. There is significant evidence that the average length of the fish is different from 20 cm.


Example 12: One-Tailed Z-Test for Proportions

Problem:
In a quality control process, 8% of a sample of 400 items are defective. Test the hypothesis that the true defect rate is less than 10% at a 0.05 significance level.

Step 1: Given Data:
$n = 400$, $p = \frac{32}{400} = 0.08$, $\pi_0 = 0.10$, $\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Z-test for proportions:
$ Z = \frac{p – \pi_0}{\sqrt{\frac{\pi_0 (1 – \pi_0)}{n}}} $
$ Z = \frac{0.08 – 0.10}{\sqrt{\frac{0.10(0.90)}{400}}} = -1.33 $

The critical value for a one-tailed test at $\alpha = 0.05$ is $Z_{critical} = -1.645$.

Step 3: Final Answer:
Since $Z = -1.33 > Z_{critical} = -1.645$, fail to reject the null hypothesis. There is not enough evidence to suggest that the defect rate is less than 10%.


Example 13: Paired T-Test

Problem:
In a study, 12 individuals’ blood pressure was measured before and after a diet. The mean reduction in blood pressure was 8 mmHg, with a standard deviation of 3 mmHg. Test whether the diet has a significant effect at a 0.05 significance level.

Step 1: Given Data:
$\bar{d} = 8$, $s_d = 3$, $n = 12$, $\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Paired T-test formula:
$ T = \frac{\bar{d}}{s_d / \sqrt{n}} $
$ T = \frac{8}{3 / \sqrt{12}} = 9.24 $

Degrees of freedom $df = n – 1 = 11$. The critical value for a one-tailed test at $\alpha = 0.05$ is $T_{critical} = 1.796$.

Step 3: Final Answer:
Since $T = 9.24 > T_{critical} = 1.796$, reject the null hypothesis. There is significant evidence that the diet reduces blood pressure.


Example 14: Chi-Square Test for Independence

Problem:
A researcher wants to know if there is a relationship between smoking and lung disease. A sample of 200 people was surveyed, and the following results were recorded:

Lung DiseaseNo Lung Disease
Smoker4060
Non-Smoker1090

Test the hypothesis that smoking is independent of lung disease at a 0.05 significance level.

Step 1: Given Data:
The observed frequencies are given in the table, with a total sample size of 200.
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Chi-square formula for independence:
$ \chi^2 = \sum \frac{(O_i – E_i)^2}{E_i} $

Expected frequencies:

  • Total smokers: 100, Total non-smokers: 100
  • Total lung disease: 50, Total no lung disease: 150

Expected frequency for Smokers with Lung Disease:
$ E_{Smoker,LD} = \frac{(100 \times 50)}{200} = 25 $

Expected frequency for Smokers without Lung Disease:
$ E_{Smoker,NLD} = \frac{(100 \times 150)}{200} = 75 $

Expected frequency for Non-Smokers with Lung Disease:
$ E_{NonSmoker,LD} = \frac{(100 \times 50)}{200} = 25 $

Expected frequency for Non-Smokers without Lung Disease:
$ E_{NonSmoker,NLD} = \frac{(100 \times 150)}{200} = 75 $

Now, calculate the Chi-square statistic: $ \chi^2 = \frac{(40 – 25)^2}{25} + \frac{(60 – 75)^2}{75} + \frac{(10 – 25)^2}{25} + \frac{(90 – 75)^2}{75} = 9 + 3 + 9 + 3 = 24 $

Degrees of freedom $df = (2 – 1)(2 – 1) = 1$.
The critical value for $\alpha = 0.05$ is $\chi^2_{critical} = 3.841$.

Step 3: Final Answer:
Since $ \chi^2 = 24 > \chi^2_{critical} = 3.841 $, reject the null hypothesis. Smoking is significantly associated with lung disease.


Example 15: Z-Test for Proportion

Problem:
In a study of 300 college students, 180 students reported exercising regularly. Test the hypothesis that the proportion of students who exercise regularly is 60% at a 0.05 significance level.

Step 1: Given Data:
$n = 300$, $p = \frac{180}{300} = 0.60$, $\pi_0 = 0.60$, $\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Z-test for proportions:
$ Z = \frac{p – \pi_0}{\sqrt{\frac{\pi_0(1 – \pi_0)}{n}}} $
$ Z = \frac{0.60 – 0.60}{\sqrt{\frac{0.60(1 – 0.60)}{300}}} = 0 $

The critical value for a two-tailed test at $\alpha = 0.05$ is $Z_{critical} = \pm 1.96$.

Step 3: Final Answer:
Since $Z = 0$, fail to reject the null hypothesis. The proportion of students who exercise regularly is not significantly different from 60%.


Example 16: Two-Tailed T-Test for Population Mean

Problem:
A sample of 25 patients has a mean cholesterol level of 200 mg/dL with a sample standard deviation of 15 mg/dL. Test the hypothesis that the population mean cholesterol level is 190 mg/dL at a 0.05 significance level.

Step 1: Given Data:
$\bar{x} = 200$, $\mu = 190$, $s = 15$, $n = 25$, $\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the T-test formula:
$ T = \frac{\bar{x} – \mu}{s / \sqrt{n}} $
$ T = \frac{200 – 190}{15 / \sqrt{25}} = 3.33 $

Degrees of freedom $df = n – 1 = 24$.
The critical value for a two-tailed test at $\alpha = 0.05$ is $T_{critical} = \pm 2.064$.

Step 3: Final Answer:
Since $T = 3.33 > T_{critical} = 2.064$, reject the null hypothesis. The population mean cholesterol level is significantly different from 190 mg/dL.


Example 17: Paired T-Test

Problem:
Ten employees’ productivity was measured before and after a new training program. The mean improvement in productivity was 5 units with a standard deviation of 1.2 units. Test whether the training program significantly improved productivity at a 0.01 significance level.

Step 1: Given Data:
$\bar{d} = 5$, $s_d = 1.2$, $n = 10$, $\alpha = 0.01$

Step 2: Solution:
The test statistic is calculated using the Paired T-test formula:
$ T = \frac{\bar{d}}{s_d / \sqrt{n}} $
$ T = \frac{5}{1.2 / \sqrt{10}} = 13.21 $

Degrees of freedom $df = n – 1 = 9$.
The critical value for a one-tailed test at $\alpha = 0.01$ is $T_{critical} = 2.821$.

Step 3: Final Answer:
Since $T = 13.21 > T_{critical} = 2.821$, reject the null hypothesis. The training program significantly improved productivity.


Example 18: Chi-Square Test for Goodness of Fit

Problem:
A candy company claims that the distribution of colors in its candy is 30% red, 30% blue, and 40% green. A sample of 200 candies was taken, with the following results: 50 red, 80 blue, and 70 green. Test the goodness of fit at a 0.05 significance level.

Step 1: Given Data:
Observed counts: $O_{red} = 50$, $O_{blue} = 80$, $O_{green} = 70$.
Expected proportions: 30% red, 30% blue, 40% green.
Expected counts: $E_{red} = 60$, $E_{blue} = 60$, $E_{green} = 80$.
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Chi-square formula:
$ \chi^2 = \sum \frac{(O_i – E_i)^2}{E_i} $
$ \chi^2 = \frac{(50 – 60)^2}{60} + \frac{(80 – 60)^2}{60} + \frac{(70 – 80)^2}{80} = 1.67 + 6.67 + 1.25 = 9.59 $

Degrees of freedom $df = 3 – 1 = 2$.
The critical value for $\alpha = 0.05$ is $\chi^2_{critical} = 5.991$.

Step 3: Final Answer:
Since $ \chi^2 = 9.59 > \chi^2_{critical} = 5.991 $, reject the null hypothesis. The color distribution does not match the claimed proportions.


Example 19: One-Tailed Z-Test for Population Mean

Problem:
A manufacturer claims that the mean lifetime of its light bulbs is at least 1,000 hours. A sample of 50 bulbs has a mean lifetime of 980 hours with a population standard deviation of 30 hours. Test the claim at a 0.01 significance level.

Step 1: Given Data:
$\bar{x} = 980$, $\mu = 1000$, $\sigma = 30$, $n = 50$, $\alpha = 0.01$

Step 2: Solution:
The test statistic is calculated using the Z-test formula:
$ Z = \frac{\bar{x} – \mu}{\sigma / \sqrt{n}} $
$ Z = \frac{980 – 1000}{30 / \sqrt{50}} = -4.71 $

The critical value for a one-tailed test at $\alpha = 0.01$ is $Z_{critical} = -2.33$.

Step 3: Final Answer:
Since $Z = -4.71 < Z_{critical} = -2.33$, reject the null hypothesis. The mean lifetime of the light bulbs is significantly less than 1,000 hours.


Example 20: Two-Tailed T-Test for Independent Samples

Problem:
Two different fertilizers are being compared to see if they affect plant growth differently. Group A (15 plants) has a mean growth of 30 cm with a standard deviation of 5 cm. Group B (12 plants) has a mean growth of 25 cm with a standard deviation of 6 cm. Test if there is a significant difference in plant growth at a 0.05 significance level.

Step 1: Given Data:
$n_1 = 15$, $\bar{x}_1 = 30$, $s_1 = 5$
$n_2 = 12$, $\bar{x}_2 = 25$, $s_2 = 6$, $\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the T-test formula for independent samples:
$ T = \frac{\bar{x}_1 – \bar{x}_2}{\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}} $
$ T = \frac{30 – 25}{\sqrt{\frac{5^2}{15} + \frac{6^2}{12}}} = 2.69 $

Degrees of freedom are approximated as $df = 25$.
The critical value for a two-tailed test at $\alpha = 0.05$ is $T_{critical} = \pm 2.064$.

Step 3: Final Answer:
Since $T = 2.69 > T_{critical} = 2.064$, reject the null hypothesis. There is a significant difference in plant growth between the two fertilizers.


Example 21: Chi-Square Test for Independence

Problem:
A survey of 150 customers is conducted to see if customer age is associated with their choice of purchasing online or in-store. The results are as follows:

OnlineIn-Store
Under 304030
Over 302060

Test the hypothesis that age and purchasing choice are independent at a 0.05 significance level.

Step 1: Given Data:
Observed frequencies are given in the table.
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Chi-square formula for independence:
$ \chi^2 = \sum \frac{(O_i – E_i)^2}{E_i} $

Expected frequencies:

  • Total for Under 30: 70, Total for Over 30: 80
  • Total for Online: 60, Total for In-Store: 90

Expected frequency for Under 30, Online:
$ E_{Under30,Online} = \frac{(70 \times 60)}{150} = 28 $

Expected frequency for Under 30, In-Store:
$ E_{Under30,InStore} = \frac{(70 \times 90)}{150} = 42 $

Expected frequency for Over 30, Online:
$ E_{Over30,Online} = \frac{(80 \times 60)}{150} = 32 $

Expected frequency for Over 30, In-Store:
$ E_{Over30,InStore} = \frac{(80 \times 90)}{150} = 48 $

Now, calculate the Chi-square statistic:
$ \chi^2 = \frac{(40 – 28)^2}{28} + \frac{(30 – 42)^2}{42} + \frac{(20 – 32)^2}{32} + \frac{(60 – 48)^2}{48} = 5.14 + 3.43 + 4.5 + 3 = 16.07 $

Degrees of freedom $df = (2 – 1)(2 – 1) = 1$.
The critical value for $\alpha = 0.05$ is $\chi^2_{critical} = 3.841$.

Step 3: Final Answer:
Since $ \chi^2 = 16.07 > \chi^2_{critical} = 3.841 $, reject the null hypothesis. Customer age and purchasing choice are significantly associated.


Example 22: Z-Test for Population Proportion

Problem:
In a sample of 200 customers, 120 prefer online shopping. Test the hypothesis that 60% of customers prefer online shopping at a 0.05 significance level.

Step 1: Given Data:
$n = 200$, $p = \frac{120}{200} = 0.60$, $\pi_0 = 0.60$, $\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Z-test for proportions:
$ Z = \frac{p – \pi_0}{\sqrt{\frac{\pi_0 (1 – \pi_0)}{n}}} $
$ Z = \frac{0.60 – 0.60}{\sqrt{\frac{0.60(0.40)}{200}}} = 0 $

The critical value for a two-tailed test at $\alpha = 0.05$ is $Z_{critical} = \pm 1.96$.

Step 3: Final Answer:
Since $Z = 0$, fail to reject the null hypothesis. There is no significant difference in the proportion of customers who prefer online shopping.


Example 23: One-Tailed Z-Test for Proportion

Problem:
A sample of 500 people shows that 280 people prefer using electric cars. Test the hypothesis that more than 50% of people prefer electric cars at a 0.05 significance level.

Step 1: Given Data:
$n = 500$, $p = \frac{280}{500} = 0.56$, $\pi_0 = 0.50$, $\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Z-test for proportions:
$ Z = \frac{p – \pi_0}{\sqrt{\frac{\pi_0(1 – \pi_0)}{n}}} $
$ Z = \frac{0.56 – 0.50}{\sqrt{\frac{0.50(1 – 0.50)}{500}}} = 2.19 $

The critical value for a one-tailed test at $\alpha = 0.05$ is $Z_{critical} = 1.645$.

Step 3: Final Answer:
Since $Z = 2.19 > Z_{critical} = 1.645$, reject the null hypothesis. More than 50% of people prefer electric cars.


Example 24: Two-Tailed T-Test for Population Mean

Problem:
A sample of 30 students has a mean study time of 6 hours per day with a sample standard deviation of 1.5 hours. Test the hypothesis that the population mean study time is 7 hours at a 0.01 significance level.

Step 1: Given Data:
$\bar{x} = 6$, $\mu = 7$, $s = 1.5$, $n = 30$, $\alpha = 0.01$

Step 2: Solution:
The test statistic is calculated using the T-test formula:
$ T = \frac{\bar{x} – \mu}{s / \sqrt{n}} $
$ T = \frac{6 – 7}{1.5 / \sqrt{30}} = -3.65 $

Degrees of freedom $df = n – 1 = 29$.
The critical value for a two-tailed test at $\alpha = 0.01$ is $T_{critical} = \pm 2.756$.

Step 3: Final Answer:
Since $T = -3.65 < T_{critical} = -2.756$, reject the null hypothesis. The population mean study time is significantly different from 7 hours.


Example 25: Paired T-Test

Problem:
In a fitness study, the weights of 8 participants were measured before and after a 3-month exercise program. The mean weight loss was 5 kg with a standard deviation of 1.5 kg. Test whether the exercise program significantly reduced weight at a 0.05 significance level.

Step 1: Given Data:
$\bar{d} = 5$, $s_d = 1.5$, $n = 8$, $\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Paired T-test formula:
$ T = \frac{\bar{d}}{s_d / \sqrt{n}} $
$ T = \frac{5}{1.5 / \sqrt{8}} = 9.43 $

Degrees of freedom $df = n – 1 = 7$.
The critical value for a one-tailed test at $\alpha = 0.05$ is $T_{critical} = 1.895$.

Step 3: Final Answer:
Since $T = 9.43 > T_{critical} = 1.895$, reject the null hypothesis. The exercise program significantly reduced weight.


Example 26: Chi-Square Test for Goodness of Fit

Problem:
A die is rolled 120 times, and the following results are observed:
1: 15, 2: 20, 3: 25, 4: 30, 5: 15, 6: 15.
Test whether the die is fair at a 0.05 significance level.

Step 1: Given Data:
Observed frequencies: $O_1 = 15$, $O_2 = 20$, $O_3 = 25$, $O_4 = 30$, $O_5 = 15$, $O_6 = 15$.
Expected frequency for each side: $E = \frac{120}{6} = 20$.
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Chi-square formula:
$ \chi^2 = \sum \frac{(O_i – E_i)^2}{E_i} $
$ \chi^2 = \frac{(15 – 20)^2}{20} + \frac{(20 – 20)^2}{20} + \frac{(25 – 20)^2}{20} + \frac{(30 – 20)^2}{20} + \frac{(15 – 20)^2}{20} + \frac{(15 – 20)^2}{20} = 1.25 + 0 + 1.25 + 5 + 1.25 + 1.25 = 10 $

Degrees of freedom $df = 6 – 1 = 5$.
The critical value for $\alpha = 0.05$ is $\chi^2_{critical} = 11.07$.

Step 3: Final Answer:
Since $ \chi^2 = 10 < \chi^2_{critical} = 11.07 $, fail to reject the null hypothesis. The die is fair.


Example 27: One-Tailed Z-Test for Population Proportion

Problem:
In a survey of 600 workers, 360 say they are satisfied with their job. Test the hypothesis that more than 50% of workers are satisfied with their job at a 0.05 significance level.

Step 1: Given Data:
$n = 600$, $p = \frac{360}{600} = 0.60$, $\pi_0 = 0.50$, $\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Z-test for proportions:
$ Z = \frac{p – \pi_0}{\sqrt{\frac{\pi_0(1 – \pi_0)}{n}}} $
$ Z = \frac{0.60 – 0.50}{\sqrt{\frac{0.50(0.50)}{600}}} = 4.90 $

The critical value for a one-tailed test at $\alpha = 0.05$ is $Z_{critical} = 1.645$.

Step 3: Final Answer:
Since $Z = 4.90 > Z_{critical} = 1.645$, reject the null hypothesis. More than 50% of workers are satisfied with their job.


Example 28: Two-Tailed T-Test for Independent Samples

Problem:
Group A (15 students) has a mean exam score of 80 with a standard deviation of 6. Group B (20 students) has a mean exam score of 85 with a standard deviation of 5. Test whether there is a significant difference in the mean exam scores at a 0.01 significance level.

Step 1: Given Data:
$n_1 = 15$, $\bar{x}_1 = 80$, $s_1 = 6$
$n_2 = 20$, $\bar{x}_2 = 85$, $s_2 = 5$, $\alpha = 0.01$

Step 2: Solution:
The test statistic is calculated using the T-test formula for independent samples:
$ T = \frac{\bar{x}_1 – \bar{x}_2}{\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}} $
$ T = \frac{80 – 85}{\sqrt{\frac{6^2}{15} + \frac{5^2}{20}}} = -2.92 $

Degrees of freedom are approximated as $df = 33$.
The critical value for a two-tailed test at $\alpha = 0.01$ is $T_{critical} = \pm 2.733$.

Step 3: Final Answer:
Since $T = -2.92 < T_{critical} = -2.733$, reject the null hypothesis. There is a significant difference in the mean exam scores between the two groups.


Example 29: Chi-Square Test for Independence

Problem:
A researcher is interested in whether diet and exercise are independent. The following data was collected from a sample of 100 individuals:

ExerciseNo Exercise
Diet4020
No Diet1030

Test the hypothesis that diet and exercise are independent at a 0.05 significance level.

Step 1: Given Data:
Observed frequencies are given in the table.
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Chi-square formula for independence:
$ \chi^2 = \sum \frac{(O_i – E_i)^2}{E_i} $

Expected frequencies:

  • Total for Diet: 60, Total for No Diet: 40
  • Total for Exercise: 50, Total for No Exercise: 50

Expected frequency for Diet and Exercise:
$ E_{Diet,Exercise} = \frac{(60 \times 50)}{100} = 30 $

Expected frequency for Diet and No Exercise:
$ E_{Diet,NoExercise} = \frac{(60 \times 50)}{100} = 30 $

Expected frequency for No Diet and Exercise:
$ E_{NoDiet,Exercise} = \frac{(40 \times 50)}{100} = 20 $

Expected frequency for No Diet and No Exercise:
$ E_{NoDiet,NoExercise} = \frac{(40 \times 50)}{100} = 20 $

Now, calculate the Chi-square statistic:
$ \chi^2 = \frac{(40 – 30)^2}{30} + \frac{(20 – 30)^2}{30} + \frac{(10 – 20)^2}{20} + \frac{(30 – 20)^2}{20} = 3.33 + 3.33 + 5 + 5 = 16.66 $

Degrees of freedom $df = (2 – 1)(2 – 1) = 1$.
The critical value for $\alpha = 0.05$ is $\chi^2_{critical} = 3.841$.

Step 3: Final Answer:
Since $ \chi^2 = 16.66 > \chi^2_{critical} = 3.841 $, reject the null hypothesis. Diet and exercise are not independent.


Example 30: One-Tailed Z-Test for Population Proportion

Problem:
In a survey of 400 adults, 240 report that they use social media daily. Test the hypothesis that more than 50% of adults use social media daily at a 0.05 significance level.

Step 1: Given Data:
$n = 400$, $p = \frac{240}{400} = 0.60$, $\pi_0 = 0.50$, $\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Z-test for proportions:
$ Z = \frac{p – \pi_0}{\sqrt{\frac{\pi_0(1 – \pi_0)}{n}}} $
$ Z = \frac{0.60 – 0.50}{\sqrt{\frac{0.50(0.50)}{400}}} = 4.00 $

The critical value for a one-tailed test at $\alpha = 0.05$ is $Z_{critical} = 1.645$.

Step 3: Final Answer:
Since $Z = 4.00 > Z_{critical} = 1.645$, reject the null hypothesis. More than 50% of adults use social media daily.


Example 31: Two-Tailed T-Test for Population Mean

Problem:
A sample of 45 customers has a mean purchase amount of $120 with a standard deviation of $20. Test the hypothesis that the population mean purchase amount is $125 at a 0.05 significance level.

Step 1: Given Data:
$\bar{x} = 120$, $\mu = 125$, $s = 20$, $n = 45$, $\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the T-test formula:
$ T = \frac{\bar{x} – \mu}{s / \sqrt{n}} $
$ T = \frac{120 – 125}{20 / \sqrt{45}} = -1.68 $

Degrees of freedom $df = n – 1 = 44$.
The critical value for a two-tailed test at $\alpha = 0.05$ is $T_{critical} = \pm 2.015$.

Step 3: Final Answer:
Since $T = -1.68$ is less than the critical value, fail to reject the null hypothesis. There is not enough evidence to conclude that the population mean is different from $125.


Example 32: Paired T-Test

Problem:
A study is conducted to measure the effectiveness of a tutoring program. The pre-test and post-test scores of 10 students are compared. The mean improvement in test scores is 15 points, with a standard deviation of 4 points. Test the hypothesis that the tutoring program is effective at a 0.01 significance level.

Step 1: Given Data:
$\bar{d} = 15$, $s_d = 4$, $n = 10$, $\alpha = 0.01$

Step 2: Solution:
The test statistic is calculated using the Paired T-test formula:
$ T = \frac{\bar{d}}{s_d / \sqrt{n}} $
$ T = \frac{15}{4 / \sqrt{10}} = 11.87 $

Degrees of freedom $df = n – 1 = 9$.
The critical value for a one-tailed test at $\alpha = 0.01$ is $T_{critical} = 2.821$.

Step 3: Final Answer:
Since $T = 11.87 > T_{critical} = 2.821$, reject the null hypothesis. The tutoring program significantly improves test scores.


Example 33: Chi-Square Test for Goodness of Fit

Problem:
A company claims that its new product comes in three colors (red, blue, and green) with equal frequency. In a sample of 90 products, the observed frequencies are: red (35), blue (25), and green (30). Test the goodness of fit at a 0.05 significance level.

Step 1: Given Data:
Observed frequencies: $O_{red} = 35$, $O_{blue} = 25$, $O_{green} = 30$.
Expected frequency for each color: $E = \frac{90}{3} = 30$.
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Chi-square formula:
$ \chi^2 = \sum \frac{(O_i – E_i)^2}{E_i} $
$ \chi^2 = \frac{(35 – 30)^2}{30} + \frac{(25 – 30)^2}{30} + \frac{(30 – 30)^2}{30} = 0.83 + 0.83 + 0 = 1.66 $

Degrees of freedom $df = 3 – 1 = 2$.
The critical value for $\alpha = 0.05$ is $\chi^2_{critical} = 5.991$.

Step 3: Final Answer:
Since $ \chi^2 = 1.66 < \chi^2_{critical} = 5.991 $, fail to reject the null hypothesis. The observed color distribution fits the expected distribution.


Example 34: One-Tailed Z-Test for Population Proportion

Problem:
A survey of 800 customers shows that 640 prefer online shopping. Test the hypothesis that more than 75% of customers prefer online shopping at a 0.01 significance level.

Step 1: Given Data:
$n = 800$, $p = \frac{640}{800} = 0.80$, $\pi_0 = 0.75$, $\alpha = 0.01$

Step 2: Solution:
The test statistic is calculated using the Z-test for proportions:
$ Z = \frac{p – \pi_0}{\sqrt{\frac{\pi_0(1 – \pi_0)}{n}}} $
$ Z = \frac{0.80 – 0.75}{\sqrt{\frac{0.75(0.25)}{800}}} = 2.83 $

The critical value for a one-tailed test at $\alpha = 0.01$ is $Z_{critical} = 2.33$.

Step 3: Final Answer:
Since $Z = 2.83 > Z_{critical} = 2.33$, reject the null hypothesis. More than 75% of customers prefer online shopping.


Example 35: Two-Tailed T-Test for Independent Samples

Problem:
Two teaching methods are compared. Group A (12 students) has a mean test score of 75 with a standard deviation of 10. Group B (15 students) has a mean test score of 85 with a standard deviation of 8. Test whether there is a significant difference in the mean test scores at a 0.05 significance level.

Step 1: Given Data:
$n_1 = 12$, $\bar{x}_1 = 75$, $s_1 = 10$
$n_2 = 15$, $\bar{x}_2 = 85$, $s_2 = 8$, $\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the T-test formula for independent samples:
$ T = \frac{\bar{x}_1 – \bar{x}_2}{\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}} $
$ T = \frac{75 – 85}{\sqrt{\frac{10^2}{12} + \frac{8^2}{15}}} = -2.71 $

Degrees of freedom are approximated as $df = 25$.
The critical value for a two-tailed test at $\alpha = 0.05$ is $T_{critical} = \pm 2.064$.

Step 3: Final Answer:
Since $T = -2.71 < T_{critical} = -2.064$, reject the null hypothesis. There is a significant difference in the mean test scores between the two groups.


Example 36: Chi-Square Test for Independence

Problem:
A company wants to know if there is a relationship between education level and job satisfaction. The following data was collected from a survey of 100 employees:

SatisfiedUnsatisfied
College Graduate4020
High School Grad1030

Test the hypothesis that education level and job satisfaction are independent at a 0.05 significance level.

Step 1: Given Data:
Observed frequencies are given in the table.
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Chi-square formula for independence:
$ \chi^2 = \sum \frac{(O_i – E_i)^2}{E_i} $

Expected frequencies:

  • Total for College Graduates: 60, Total for High School Graduates: 40
  • Total for Satisfied: 50, Total for Unsatisfied: 50

Expected frequency for College Graduate, Satisfied:
$ E_{College,Satisfied} = \frac{(60 \times 50)}{100} = 30 $

Expected frequency for College Graduate, Unsatisfied:
$ E_{College,Unsatisfied} = \frac{(60 \times 50)}{100} = 30 $

Expected frequency for High School Grad, Satisfied:
$ E_{HS,Satisfied} = \frac{(40 \times 50)}{100} = 20 $

Expected frequency for High School Grad, Unsatisfied:
$ E_{HS,Unsatisfied} = \frac{(40 \times 50)}{100} = 20 $

Now, calculate the Chi-square statistic:
$ \chi^2 = \frac{(40 – 30)^2}{30} + \frac{(20 – 30)^2}{30} + \frac{(10 – 20)^2}{20} + \frac{(30 – 20)^2}{20} = 3.33 + 3.33 + 5 + 5 = 16.66 $

Degrees of freedom $df = (2 – 1)(2 – 1) = 1$.
The critical value for $\alpha = 0.05$ is $\chi^2_{critical} = 3.841$.

Step 3: Final Answer:
Since $ \chi^2 = 16.66 > \chi^2_{critical} = 3.841 $, reject the null hypothesis. Education level and job satisfaction are not independent.


Example 37: Z-Test for Population Mean

Problem:
A scientist claims that the mean height of a specific plant species is 100 cm. A sample of 36 plants has a mean height of 98 cm with a population standard deviation of 5 cm. Test the hypothesis at a 0.05 significance level.

Step 1: Given Data:
$\bar{x} = 98$, $\mu = 100$, $\sigma = 5$, $n = 36$, $\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Z-test formula:
$ Z = \frac{\bar{x} – \mu}{\sigma / \sqrt{n}} $
$ Z = \frac{98 – 100}{5 / \sqrt{36}} = -2.40 $

The critical value for a two-tailed test at $\alpha = 0.05$ is $Z_{critical} = \pm 1.96$.

Step 3: Final Answer:
Since $Z = -2.40 < Z_{critical} = -1.96$, reject the null hypothesis. The mean height of the plants is significantly different from 100 cm.


Example 38: Two-Tailed T-Test for Population Mean

Problem:
A restaurant claims that the average time customers spend at their tables is 45 minutes. A sample of 25 customers has a mean time of 42 minutes with a standard deviation of 5 minutes. Test whether the population mean time is significantly different from 45 minutes at a 0.05 significance level.

Step 1: Given Data:
$\bar{x} = 42$, $\mu = 45$, $s = 5$, $n = 25$, $\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the T-test formula:
$ T = \frac{\bar{x} – \mu}{s / \sqrt{n}} $
$ T = \frac{42 – 45}{5 / \sqrt{25}} = -3.00 $

Degrees of freedom $df = n – 1 = 24$.
The critical value for a two-tailed test at $\alpha = 0.05$ is $T_{critical} = \pm 2.064$.

Step 3: Final Answer:
Since $T = -3.00 < T_{critical} = -2.064$, reject the null hypothesis. The population mean time spent at the restaurant is significantly different from 45 minutes.


Example 39: Paired T-Test

Problem:
A study is conducted to test whether a new teaching method improves student performance. Ten students’ scores were recorded before and after using the new method. The mean difference in scores was 8 points with a standard deviation of 2 points. Test whether the new teaching method significantly improves performance at a 0.01 significance level.

Step 1: Given Data:
$\bar{d} = 8$, $s_d = 2$, $n = 10$, $\alpha = 0.01$

Step 2: Solution:
The test statistic is calculated using the Paired T-test formula:
$ T = \frac{\bar{d}}{s_d / \sqrt{n}} $
$ T = \frac{8}{2 / \sqrt{10}} = 12.65 $

Degrees of freedom $df = n – 1 = 9$.
The critical value for a one-tailed test at $\alpha = 0.01$ is $T_{critical} = 2.821$.

Step 3: Final Answer:
Since $T = 12.65 > T_{critical} = 2.821$, reject the null hypothesis. The new teaching method significantly improves performance.


Example 40: Chi-Square Test for Goodness of Fit

Problem:
A die is rolled 150 times, and the following results are observed:
1: 20, 2: 30, 3: 25, 4: 20, 5: 30, 6: 25.
Test whether the die is fair at a 0.05 significance level.

Step 1: Given Data:
Observed frequencies: $O_1 = 20$, $O_2 = 30$, $O_3 = 25$, $O_4 = 20$, $O_5 = 30$, $O_6 = 25$.
Expected frequency for each side: $E = \frac{150}{6} = 25$.
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Chi-square formula:
$ \chi^2 = \sum \frac{(O_i – E_i)^2}{E_i} $
$ \chi^2 = \frac{(20 – 25)^2}{25} + \frac{(30 – 25)^2}{25} + \frac{(25 – 25)^2}{25} + \frac{(20 – 25)^2}{25} + \frac{(30 – 25)^2}{25} + \frac{(25 – 25)^2}{25} = 1 + 1 + 0 + 1 + 1 + 0 = 4 $

Degrees of freedom $df = 6 – 1 = 5$.
The critical value for $\alpha = 0.05$ is $\chi^2_{critical} = 11.07$.

Step 3: Final Answer:
Since $ \chi^2 = 4 < \chi^2_{critical} = 11.07 $, fail to reject the null hypothesis. The die is fair.


Example 41: One-Tailed Z-Test for Population Proportion

Problem:
A survey of 600 people shows that 400 prefer to use public transportation. Test the hypothesis that more than 60% of people prefer public transportation at a 0.05 significance level.

Step 1: Given Data:
$n = 600$, $p = \frac{400}{600} = 0.67$, $\pi_0 = 0.60$, $\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Z-test for proportions:
$ Z = \frac{p – \pi_0}{\sqrt{\frac{\pi_0(1 – \pi_0)}{n}}} $
$ Z = \frac{0.67 – 0.60}{\sqrt{\frac{0.60(0.40)}{600}}} = 3.46 $

The critical value for a one-tailed test at $\alpha = 0.05$ is $Z_{critical} = 1.645$.

Step 3: Final Answer:
Since $Z = 3.46 > Z_{critical} = 1.645$, reject the null hypothesis. More than 60% of people prefer public transportation.


Example 42: Two-Tailed T-Test for Independent Samples

Problem:
Two diets are being tested for effectiveness. Group A (20 participants) has a mean weight loss of 10 kg with a standard deviation of 2 kg. Group B (25 participants) has a mean weight loss of 8 kg with a standard deviation of 3 kg. Test whether there is a significant difference in the mean weight loss at a 0.05 significance level.

Step 1: Given Data:
$n_1 = 20$, $\bar{x}_1 = 10$, $s_1 = 2$
$n_2 = 25$, $\bar{x}_2 = 8$, $s_2 = 3$, $\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the T-test formula for independent samples:
$ T = \frac{\bar{x}_1 – \bar{x}_2}{\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}} $
$ T = \frac{10 – 8}{\sqrt{\frac{2^2}{20} + \frac{3^2}{25}}} = 2.57 $

Degrees of freedom are approximated as $df = 43$.
The critical value for a two-tailed test at $\alpha = 0.05$ is $T_{critical} = \pm 2.016$.

Step 3: Final Answer:
Since $T = 2.57 > T_{critical} = 2.016$, reject the null hypothesis. There is a significant difference in the mean weight loss between the two groups.


Example 43: Chi-Square Test for Independence

Problem:
A study was conducted to determine if there is a relationship between exercise frequency and heart health. The results of the survey of 200 people are shown below:

Good Heart HealthPoor Heart Health
Exercise8040
No Exercise3050

Test the hypothesis that exercise frequency and heart health are independent at a 0.05 significance level.

Step 1: Given Data:
Observed frequencies are given in the table.
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Chi-square formula for independence:
$ \chi^2 = \sum \frac{(O_i – E_i)^2}{E_i} $

Expected frequencies:

  • Total for Exercise: 120, Total for No Exercise: 80
  • Total for Good Heart Health: 110, Total for Poor Heart Health: 90

Expected frequency for Exercise, Good Heart Health:
$ E_{Exercise,GoodHealth} = \frac{(120 \times 110)}{200} = 66 $

Expected frequency for Exercise, Poor Heart Health:
$ E_{Exercise,PoorHealth} = \frac{(120 \times 90)}{200} = 54 $

Expected frequency for No Exercise, Good Heart Health:
$ E_{NoExercise,GoodHealth} = \frac{(80 \times 110)}{200} = 44 $

Expected frequency for No Exercise, Poor Heart Health:
$ E_{NoExercise,PoorHealth} = \frac{(80 \times 90)}{200} = 36 $

Now, calculate the Chi-square statistic:
$ \chi^2 = \frac{(80 – 66)^2}{66} + \frac{(40 – 54)^2}{54} + \frac{(30 – 44)^2}{44} + \frac{(50 – 36)^2}{36} = 3.18 + 3.63 + 4.45 + 5.44 = 16.70 $

Degrees of freedom $df = (2 – 1)(2 – 1) = 1$.
The critical value for $\alpha = 0.05$ is $\chi^2_{critical} = 3.841$.

Step 3: Final Answer:
Since $ \chi^2 = 16.70 > \chi^2_{critical} = 3.841 $, reject the null hypothesis. Exercise frequency and heart health are not independent.


Example 44: One-Tailed Z-Test for Population Mean

Problem:
A manufacturer claims that the average lifespan of its batteries is at least 500 hours. A sample of 40 batteries has a mean lifespan of 480 hours with a population standard deviation of 50 hours. Test the claim at a 0.05 significance level.

Step 1: Given Data:
$\bar{x} = 480$, $\mu = 500$, $\sigma = 50$, $n = 40$, $\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Z-test formula:
$ Z = \frac{\bar{x} – \mu}{\sigma / \sqrt{n}} $
$ Z = \frac{480 – 500}{50 / \sqrt{40}} = -2.53 $

The critical value for a one-tailed test at $\alpha = 0.05$ is $Z_{critical} = -1.645$.

Step 3: Final Answer:
Since $Z = -2.53 < Z_{critical} = -1.645$, reject the null hypothesis. The average lifespan of the batteries is significantly less than 500 hours.


Example 45: Two-Tailed T-Test for Population Mean

Problem:
A sample of 35 workers in a company has an average hourly wage of $18 with a standard deviation of $2. Test the hypothesis that the population mean hourly wage is $20 at a 0.01 significance level.

Step 1: Given Data:
$\bar{x} = 18$, $\mu = 20$, $s = 2$, $n = 35$, $\alpha = 0.01$

Step 2: Solution:
The test statistic is calculated using the T-test formula:
$ T = \frac{\bar{x} – \mu}{s / \sqrt{n}} $
$ T = \frac{18 – 20}{2 / \sqrt{35}} = -5.94 $

Degrees of freedom $df = n – 1 = 34$.
The critical value for a two-tailed test at $\alpha = 0.01$ is $T_{critical} = \pm 2.728$.

Step 3: Final Answer:
Since $T = -5.94 < T_{critical} = -2.728$, reject the null hypothesis. The population mean hourly wage is significantly different from $20.


Example 46: Paired T-Test

Problem:
A research team wants to test whether a memory enhancement program improves memory. They administer a memory test to 15 participants before and after the program. The mean difference in scores is 7 points, with a standard deviation of 3 points. Test whether the program significantly improves memory at a 0.01 significance level.

Step 1: Given Data:
$\bar{d} = 7$, $s_d = 3$, $n = 15$, $\alpha = 0.01$

Step 2: Solution:
The test statistic is calculated using the Paired T-test formula:
$ T = \frac{\bar{d}}{s_d / \sqrt{n}} $
$ T = \frac{7}{3 / \sqrt{15}} = 9.04 $

Degrees of freedom $df = n – 1 = 14$.
The critical value for a one-tailed test at $\alpha = 0.01$ is $T_{critical} = 2.624$.

Step 3: Final Answer:
Since $T = 9.04 > T_{critical} = 2.624$, reject the null hypothesis. The memory enhancement program significantly improves memory.


Example 47: Chi-Square Test for Goodness of Fit

Problem:
A store manager wants to test whether the sales distribution across four different product categories is uniform. The observed sales over a month are: Category A (45), Category B (55), Category C (60), and Category D (40). Test the goodness of fit at a 0.05 significance level.

Step 1: Given Data:
Observed frequencies: $O_A = 45$, $O_B = 55$, $O_C = 60$, $O_D = 40$.
Expected frequency for each category: $E = \frac{200}{4} = 50$.
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Chi-square formula:
$ \chi^2 = \sum \frac{(O_i – E_i)^2}{E_i} $
$ \chi^2 = \frac{(45 – 50)^2}{50} + \frac{(55 – 50)^2}{50} + \frac{(60 – 50)^2}{50} + \frac{(40 – 50)^2}{50} = 0.50 + 0.50 + 2 + 2 = 5.00 $

Degrees of freedom $df = 4 – 1 = 3$.
The critical value for $\alpha = 0.05$ is $\chi^2_{critical} = 7.815$.

Step 3: Final Answer:
Since $ \chi^2 = 5.00 < \chi^2_{critical} = 7.815 $, fail to reject the null hypothesis. The sales distribution across categories is uniform.


Example 48: One-Tailed Z-Test for Population Proportion

Problem:
In a survey of 500 voters, 320 said they plan to vote in the upcoming election. Test the hypothesis that more than 60% of voters plan to vote at a 0.05 significance level.

Step 1: Given Data:
$n = 500$, $p = \frac{320}{500} = 0.64$, $\pi_0 = 0.60$, $\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Z-test for proportions:
$ Z = \frac{p – \pi_0}{\sqrt{\frac{\pi_0(1 – \pi_0)}{n}}} $
$ Z = \frac{0.64 – 0.60}{\sqrt{\frac{0.60(0.40)}{500}}} = 2.26 $

The critical value for a one-tailed test at $\alpha = 0.05$ is $Z_{critical} = 1.645$.

Step 3: Final Answer:
Since $Z = 2.26 > Z_{critical} = 1.645$, reject the null hypothesis. More than 60% of voters plan to vote.


Example 49: Two-Tailed T-Test for Independent Samples

Problem:
Two medications are being tested to see if they have different effects on pain relief. Group A (12 patients) has an average pain reduction of 6 points with a standard deviation of 1.5 points. Group B (10 patients) has an average pain reduction of 8 points with a standard deviation of 2 points. Test whether there is a significant difference in the effects of the medications at a 0.01 significance level.

Step 1: Given Data:
$n_1 = 12$, $\bar{x}_1 = 6$, $s_1 = 1.5$
$n_2 = 10$, $\bar{x}_2 = 8$, $s_2 = 2$, $\alpha = 0.01$

Step 2: Solution:
The test statistic is calculated using the T-test formula for independent samples:
$ T = \frac{\bar{x}_1 – \bar{x}_2}{\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}} $
$ T = \frac{6 – 8}{\sqrt{\frac{1.5^2}{12} + \frac{2^2}{10}}} = -3.25 $

Degrees of freedom are approximated as $df = 20$.
The critical value for a two-tailed test at $\alpha = 0.01$ is $T_{critical} = \pm 2.845$.

Step 3: Final Answer:
Since $T = -3.25 < T_{critical} = -2.845$, reject the null hypothesis. There is a significant difference in the effects of the two medications.


Example 50: Chi-Square Test for Independence

Problem:
A company wants to test if there is a relationship between gender and department preference. The survey data is given below for 120 employees:

HRFinanceIT
Male203010
Female202020

Test the hypothesis that gender and department preference are independent at a 0.05 significance level.

Step 1: Given Data:
Observed frequencies are provided in the table.
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Chi-square formula for independence:
$ \chi^2 = \sum \frac{(O_i – E_i)^2}{E_i} $

Expected frequencies:

  • Total for HR: 40, Total for Finance: 50, Total for IT: 30
  • Total for Males: 60, Total for Females: 60

Expected frequency for Male, HR:
$ E_{Male,HR} = \frac{(60 \times 40)}{120} = 20 $

Expected frequency for Male, Finance:
$ E_{Male,Finance} = \frac{(60 \times 50)}{120} = 25 $

Expected frequency for Male, IT:
$ E_{Male,IT} = \frac{(60 \times 30)}{120} = 15 $

Expected frequency for Female, HR:
$ E_{Female,HR} = \frac{(60 \times 40)}{120} = 20 $

Expected frequency for Female, Finance:
$ E_{Female,Finance} = \frac{(60 \times 50)}{120} = 25 $

Expected frequency for Female, IT:
$ E_{Female,IT} = \frac{(60 \times 30)}{120} = 15 $

Now, calculate the Chi-square statistic:
$ \chi^2 = \frac{(20 – 20)^2}{20} + \frac{(30 – 25)^2}{25} + \frac{(10 – 15)^2}{15} + \frac{(20 – 20)^2}{20} + \frac{(20 – 25)^2}{25} + \frac{(20 – 15)^2}{15} = 0 + 1 + 1.67 + 0 + 1 + 1.67 = 5.34 $

Degrees of freedom $df = (2 – 1)(3 – 1) = 2$.
The critical value for $\alpha = 0.05$ is $\chi^2_{critical} = 5.991$.

Step 3: Final Answer:
Since $ \chi^2 = 5.34 < \chi^2_{critical} = 5.991 $, fail to reject the null hypothesis. Gender and department preference are independent.


Example 51: One-Tailed Z-Test for Population Mean

Problem:
A sample of 36 children has an average test score of 75 with a population standard deviation of 10. Test whether the population mean test score is greater than 70 at a 0.05 significance level.

Step 1: Given Data:
$\bar{x} = 75$, $\mu = 70$, $\sigma = 10$, $n = 36$, $\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Z-test formula:
$ Z = \frac{\bar{x} – \mu}{\sigma / \sqrt{n}} $
$ Z = \frac{75 – 70}{10 / \sqrt{36}} = 3.00 $

The critical value for a one-tailed test at $\alpha = 0.05$ is $Z_{critical} = 1.645$.

Step 3: Final Answer:
Since $Z = 3.00 > Z_{critical} = 1.645$, reject the null hypothesis. The population mean test score is greater than 70.


Example 52: Two-Tailed T-Test for Population Mean

Problem:
A factory claims that its machines produce bottles with an average volume of 500 ml. A sample of 25 bottles has an average volume of 498 ml with a sample standard deviation of 4 ml. Test whether the population mean volume is significantly different from 500 ml at a 0.01 significance level.

Step 1: Given Data:
$\bar{x} = 498$, $\mu = 500$, $s = 4$, $n = 25$, $\alpha = 0.01$

Step 2: Solution:
The test statistic is calculated using the T-test formula:
$ T = \frac{\bar{x} – \mu}{s / \sqrt{n}} $
$ T = \frac{498 – 500}{4 / \sqrt{25}} = -2.50 $

Degrees of freedom $df = n – 1 = 24$.
The critical value for a two-tailed test at $\alpha = 0.01$ is $T_{critical} = \pm 2.797$.

Step 3: Final Answer:
Since $T = -2.50$ is less than the critical value, fail to reject the null hypothesis. There is not enough evidence to conclude that the population mean volume is different from 500 ml.


Example 53: Paired T-Test

Problem:
In a study of 12 patients, blood pressure was measured before and after a new medication. The mean decrease in blood pressure was 10 mmHg with a standard deviation of 2 mmHg. Test whether the medication significantly reduces blood pressure at a 0.05 significance level.

Step 1: Given Data:
$\bar{d} = 10$
$s_d = 2$
$n = 12$
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Paired T-test formula:
$ T = \frac{\bar{d}}{s_d / \sqrt{n}} $
$ T = \frac{10}{2 / \sqrt{12}} = 17.32 $

Degrees of freedom $df = n – 1 = 11$

The critical value for a one-tailed test at $\alpha = 0.05$ is $T_{critical} = 1.796$

Step 3: Final Answer:
Since $T = 17.32 > T_{critical} = 1.796$, reject the null hypothesis

The medication significantly reduces blood pressure


Example 54: Chi-Square Test for Goodness of Fit

Problem:
A coin is flipped 100 times, and the results are: 60 heads and 40 tails. Test whether the coin is fair at a 0.05 significance level.

Step 1: Given Data:
Observed frequencies: $O_{heads} = 60$, $O_{tails} = 40$
Expected frequency for heads and tails: $E = \frac{100}{2} = 50$
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Chi-square formula:
$ \chi^2 = \sum \frac{(O_i – E_i)^2}{E_i} $
$ \chi^2 = \frac{(60 – 50)^2}{50} + \frac{(40 – 50)^2}{50} = 2 + 2 = 4 $

Degrees of freedom $df = 2 – 1 = 1$

The critical value for $\alpha = 0.05$ is $\chi^2_{critical} = 3.841$

Step 3: Final Answer:
Since $ \chi^2 = 4 > \chi^2_{critical} = 3.841 $, reject the null hypothesis

The coin is not fair


Example 55: One-Tailed Z-Test for Population Proportion

Problem:
A survey of 300 customers shows that 210 prefer online shopping. Test the hypothesis that more than 65% of customers prefer online shopping at a 0.05 significance level.

Step 1: Given Data:
$n = 300$
$p = \frac{210}{300} = 0.70$
$\pi_0 = 0.65$
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Z-test for proportions:
$ Z = \frac{p – \pi_0}{\sqrt{\frac{\pi_0(1 – \pi_0)}{n}}} $
$ Z = \frac{0.70 – 0.65}{\sqrt{\frac{0.65(0.35)}{300}}} = 1.94 $

The critical value for a one-tailed test at $\alpha = 0.05$ is $Z_{critical} = 1.645$

Step 3: Final Answer:
Since $Z = 1.94 > Z_{critical} = 1.645$, reject the null hypothesis

More than 65% of customers prefer online shopping


Example 56: Two-Tailed T-Test for Independent Samples

Problem:
Group A (20 workers) has an average salary of $40,000 with a standard deviation of $5,000. Group B (25 workers) has an average salary of $42,000 with a standard deviation of $4,500. Test whether there is a significant difference in the average salaries at a 0.05 significance level.

Step 1: Given Data:
$n_1 = 20$
$\bar{x}_1 = 40,000$
$s_1 = 5,000$
$n_2 = 25$
$\bar{x}_2 = 42,000$
$s_2 = 4,500$
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the T-test formula for independent samples:
$ T = \frac{\bar{x}_1 – \bar{x}_2}{\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}} $
$ T = \frac{40,000 – 42,000}{\sqrt{\frac{5,000^2}{20} + \frac{4,500^2}{25}}} = -1.56 $

Degrees of freedom are approximated as $df = 43$

The critical value for a two-tailed test at $\alpha = 0.05$ is $T_{critical} = \pm 2.016$

Step 3: Final Answer:
Since $T = -1.56$ is less than the critical value, fail to reject the null hypothesis

There is no significant difference in the average salaries


Example 57: Chi-Square Test for Independence

Problem:
A study is conducted to determine whether exercise and diet are related. The data from 100 people are shown below:

ExerciseNo Exercise
Diet4030
No Diet1020

Test the hypothesis that diet and exercise are independent at a 0.05 significance level.

Step 1: Given Data:
Observed frequencies are given in the table
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Chi-square formula for independence:
$ \chi^2 = \sum \frac{(O_i – E_i)^2}{E_i} $

Expected frequencies:

  • Total for Diet: 70, Total for No Diet: 30
  • Total for Exercise: 50, Total for No Exercise: 50

Expected frequency for Diet and Exercise:
$ E_{Diet,Exercise} = \frac{(70 \times 50)}{100} = 35 $

Expected frequency for Diet and No Exercise:
$ E_{Diet,NoExercise} = \frac{(70 \times 50)}{100} = 35 $

Expected frequency for No Diet and Exercise:
$ E_{NoDiet,Exercise} = \frac{(30 \times 50)}{100} = 15 $

Expected frequency for No Diet and No Exercise:
$ E_{NoDiet,NoExercise} = \frac{(30 \times 50)}{100} = 15 $

Now, calculate the Chi-square statistic:
$ \chi^2 = \frac{(40 – 35)^2}{35} + \frac{(30 – 35)^2}{35} + \frac{(10 – 15)^2}{15} + \frac{(20 – 15)^2}{15} = 0.71 + 0.71 + 1.67 + 1.67 = 4.76 $

Degrees of freedom $df = (2 – 1)(2 – 1) = 1$

The critical value for $\alpha = 0.05$ is $\chi^2_{critical} = 3.841$

Step 3: Final Answer:
Since $ \chi^2 = 4.76 > \chi^2_{critical} = 3.841 $, reject the null hypothesis

Diet and exercise are not independent


Example 58: One-Tailed Z-Test for Population Mean

Problem:
A sample of 25 students has an average test score of 82 with a population standard deviation of 6. Test whether the population mean test score is greater than 80 at a 0.05 significance level.

Step 1: Given Data:
$\bar{x} = 82$
$\mu = 80$
$\sigma = 6$
$n = 25$
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Z-test formula:
$ Z = \frac{\bar{x} – \mu}{\sigma / \sqrt{n}} $
$ Z = \frac{82 – 80}{6 / \sqrt{25}} = 1.67 $

The critical value for a one-tailed test at $\alpha = 0.05$ is $Z_{critical} = 1.645$

Step 3: Final Answer:
Since $Z = 1.67 > Z_{critical} = 1.645$, reject the null hypothesis

The population mean test score is greater than 80


Example 59: Two-Tailed T-Test for Population Mean

Problem:
A sample of 30 workers in a factory has a mean productivity score of 85 with a sample standard deviation of 5. Test the hypothesis that the population mean productivity score is 90 at a 0.01 significance level.

Step 1: Given Data:
$\bar{x} = 85$
$\mu = 90$
$s = 5$
$n = 30$
$\alpha = 0.01$

Step 2: Solution:
The test statistic is calculated using the T-test formula:
$ T = \frac{\bar{x} – \mu}{s / \sqrt{n}} $
$ T = \frac{85 – 90}{5 / \sqrt{30}} = -5.48 $

Degrees of freedom $df = n – 1 = 29$

The critical value for a two-tailed test at $\alpha = 0.01$ is $T_{critical} = \pm 2.756$

Step 3: Final Answer:
Since $T = -5.48 < T_{critical} = -2.756$, reject the null hypothesis

The population mean productivity score is significantly different from 90


Example 60: Paired T-Test

Problem:
In a study of 15 athletes, their performance scores were measured before and after a training program. The mean improvement was 5 points with a standard deviation of 1.5 points. Test whether the training program significantly improves performance at a 0.05 significance level.

Step 1: Given Data:
$\bar{d} = 5$
$s_d = 1.5$
$n = 15$
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Paired T-test formula:
$ T = \frac{\bar{d}}{s_d / \sqrt{n}} $
$ T = \frac{5}{1.5 / \sqrt{15}} = 12.91 $

Degrees of freedom $df = n – 1 = 14$

The critical value for a one-tailed test at $\alpha = 0.05$ is $T_{critical} = 1.761$

Step 3: Final Answer:
Since $T = 12.91 > T_{critical} = 1.761$, reject the null hypothesis

The training program significantly improves performance


Example 61: Chi-Square Test for Goodness of Fit

Problem:
A dice is rolled 150 times and the outcomes are observed as:
1: 20, 2: 25, 3: 30, 4: 20, 5: 25, 6: 30.
Test whether the die is fair at a 0.05 significance level.

Step 1: Given Data:
Observed frequencies: $O_1 = 20$, $O_2 = 25$, $O_3 = 30$, $O_4 = 20$, $O_5 = 25$, $O_6 = 30$
Expected frequency for each side: $E = \frac{150}{6} = 25$
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Chi-square formula:
$ \chi^2 = \sum \frac{(O_i – E_i)^2}{E_i} $
$ \chi^2 = \frac{(20 – 25)^2}{25} + \frac{(25 – 25)^2}{25} + \frac{(30 – 25)^2}{25} + \frac{(20 – 25)^2}{25} + \frac{(25 – 25)^2}{25} + \frac{(30 – 25)^2}{25} = 1 + 0 + 1 + 1 + 0 + 1 = 4 $

Degrees of freedom $df = 6 – 1 = 5$

The critical value for $\alpha = 0.05$ is $\chi^2_{critical} = 11.07$

Step 3: Final Answer:
Since $ \chi^2 = 4 < \chi^2_{critical} = 11.07 $, fail to reject the null hypothesis

The die is fair


Example 62: One-Tailed Z-Test for Population Proportion

Problem:
A survey of 400 adults shows that 250 are in favor of a new policy. Test the hypothesis that more than 60% of adults favor the policy at a 0.05 significance level.

Step 1: Given Data:
$n = 400$
$p = \frac{250}{400} = 0.625$
$\pi_0 = 0.60$
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Z-test for proportions:
$ Z = \frac{p – \pi_0}{\sqrt{\frac{\pi_0(1 – \pi_0)}{n}}} $
$ Z = \frac{0.625 – 0.60}{\sqrt{\frac{0.60(0.40)}{400}}} = 1.15 $

The critical value for a one-tailed test at $\alpha = 0.05$ is $Z_{critical} = 1.645$

Step 3: Final Answer:
Since $Z = 1.15 < Z_{critical} = 1.645$, fail to reject the null hypothesis

There is not enough evidence to conclude that more than 60% of adults favor the policy


Example 63: Two-Tailed T-Test for Independent Samples

Problem:
Two different diets are being tested to see if they lead to different levels of weight loss. Group A (10 participants) has a mean weight loss of 5 kg with a standard deviation of 1 kg. Group B (12 participants) has a mean weight loss of 6 kg with a standard deviation of 1.2 kg. Test if there is a significant difference between the two diets at a 0.05 significance level.

Step 1: Given Data:
$n_1 = 10$
$\bar{x}_1 = 5$
$s_1 = 1$
$n_2 = 12$
$\bar{x}_2 = 6$
$s_2 = 1.2$
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the T-test formula for independent samples:
$ T = \frac{\bar{x}_1 – \bar{x}_2}{\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}} $
$ T = \frac{5 – 6}{\sqrt{\frac{1^2}{10} + \frac{1.2^2}{12}}} = -2.17 $

Degrees of freedom are approximated as $df = 20$

The critical value for a two-tailed test at $\alpha = 0.05$ is $T_{critical} = \pm 2.086$

Step 3: Final Answer:
Since $T = -2.17 < T_{critical} = -2.086$, reject the null hypothesis

There is a significant difference between the two diets


Example 64: Chi-Square Test for Independence

Problem:
A survey is conducted to test whether gender and preference for a certain type of movie (Action or Comedy) are related. The following data is collected:

ActionComedy
Male5030
Female2040

Test the hypothesis that gender and movie preference are independent at a 0.05 significance level.

Step 1: Given Data:
Observed frequencies are given in the table
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Chi-square formula for independence:
$ \chi^2 = \sum \frac{(O_i – E_i)^2}{E_i} $

Expected frequencies:

  • Total for Action: 70, Total for Comedy: 70
  • Total for Males: 80, Total for Females: 60

Expected frequency for Male, Action:
$ E_{Male,Action} = \frac{(80 \times 70)}{140} = 40 $

Expected frequency for Male, Comedy:
$ E_{Male,Comedy} = \frac{(80 \times 70)}{140} = 40 $

Expected frequency for Female, Action:
$ E_{Female,Action} = \frac{(60 \times 70)}{140} = 30 $

Expected frequency for Female, Comedy:
$ E_{Female,Comedy} = \frac{(60 \times 70)}{140} = 30 $

Now, calculate the Chi-square statistic:
$ \chi^2 = \frac{(50 – 40)^2}{40} + \frac{(30 – 40)^2}{40} + \frac{(20 – 30)^2}{30} + \frac{(40 – 30)^2}{30} = 2.5 + 2.5 + 3.33 + 3.33 = 11.66 $

Degrees of freedom $df = (2 – 1)(2 – 1) = 1$

The critical value for $\alpha = 0.05$ is $\chi^2_{critical} = 3.841$

Step 3: Final Answer:
Since $ \chi^2 = 11.66 > \chi^2_{critical} = 3.841 $, reject the null hypothesis

Gender and movie preference are not independent


Example 65: One-Tailed Z-Test for Population Mean

Problem:
A researcher claims that the average number of hours spent studying per week for students is at least 15 hours. A sample of 40 students shows a mean of 13.5 hours with a population standard deviation of 3 hours. Test the claim at a 0.05 significance level.

Step 1: Given Data:
$\bar{x} = 13.5$
$\mu = 15$
$\sigma = 3$
$n = 40$
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Z-test formula:
$ Z = \frac{\bar{x} – \mu}{\sigma / \sqrt{n}} $
$ Z = \frac{13.5 – 15}{3 / \sqrt{40}} = -3.16 $

The critical value for a one-tailed test at $\alpha = 0.05$ is $Z_{critical} = -1.645$

Step 3: Final Answer:
Since $Z = -3.16 < Z_{critical} = -1.645$, reject the null hypothesis

The average number of hours spent studying is less than 15 hours


Example 66: Two-Tailed T-Test for Population Mean

Problem:
A sample of 20 factory workers has an average monthly income of $3,200 with a standard deviation of $400. Test the hypothesis that the population mean monthly income is $3,500 at a 0.05 significance level.

Step 1: Given Data:
$\bar{x} = 3,200$
$\mu = 3,500$
$s = 400$
$n = 20$
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the T-test formula:
$ T = \frac{\bar{x} – \mu}{s / \sqrt{n}} $
$ T = \frac{3,200 – 3,500}{400 / \sqrt{20}} = -3.35 $

Degrees of freedom $df = n – 1 = 19$

The critical value for a two-tailed test at $\alpha = 0.05$ is $T_{critical} = \pm 2.093$

Step 3: Final Answer:
Since $T = -3.35 < T_{critical} = -2.093$, reject the null hypothesis

The population mean monthly income is significantly different from $3,500


Example 67: Paired T-Test

Problem:
In a study of 10 patients, their blood sugar levels were measured before and after taking a new medication. The mean decrease in blood sugar levels was 20 mg/dL, with a standard deviation of 5 mg/dL. Test whether the medication significantly lowers blood sugar at a 0.01 significance level.

Step 1: Given Data:
$\bar{d} = 20$
$s_d = 5$
$n = 10$
$\alpha = 0.01$

Step 2: Solution:
The test statistic is calculated using the Paired T-test formula:
$ T = \frac{\bar{d}}{s_d / \sqrt{n}} $
$ T = \frac{20}{5 / \sqrt{10}} = 12.65 $

Degrees of freedom $df = n – 1 = 9$

The critical value for a one-tailed test at $\alpha = 0.01$ is $T_{critical} = 2.821$

Step 3: Final Answer:
Since $T = 12.65 > T_{critical} = 2.821$, reject the null hypothesis

The medication significantly lowers blood sugar


Example 68: Chi-Square Test for Goodness of Fit

Problem:
A company claims that its sales are equally distributed among four regions (North, South, East, and West). The observed sales for one month are:
North: 35, South: 25, East: 20, West: 20.
Test the claim at a 0.05 significance level.

Step 1: Given Data:
Observed frequencies: $O_{North} = 35$, $O_{South} = 25$, $O_{East} = 20$, $O_{West} = 20$
Expected frequency for each region: $E = \frac{100}{4} = 25$
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Chi-square formula:
$ \chi^2 = \sum \frac{(O_i – E_i)^2}{E_i} $
$ \chi^2 = \frac{(35 – 25)^2}{25} + \frac{(25 – 25)^2}{25} + \frac{(20 – 25)^2}{25} + \frac{(20 – 25)^2}{25} = 4 + 0 + 1 + 1 = 6 $

Degrees of freedom $df = 4 – 1 = 3$

The critical value for $\alpha = 0.05$ is $\chi^2_{critical} = 7.815$

Step 3: Final Answer:
Since $ \chi^2 = 6 < \chi^2_{critical} = 7.815 $, fail to reject the null hypothesis

The sales distribution is consistent with the company’s claim


Example 69: One-Tailed Z-Test for Population Proportion

Problem:
A sample of 500 employees at a company reveals that 320 are satisfied with their job. Test the hypothesis that more than 60% of employees are satisfied at a 0.05 significance level.

Step 1: Given Data:
$n = 500$
$p = \frac{320}{500} = 0.64$
$\pi_0 = 0.60$
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Z-test for proportions:
$ Z = \frac{p – \pi_0}{\sqrt{\frac{\pi_0(1 – \pi_0)}{n}}} $
$ Z = \frac{0.64 – 0.60}{\sqrt{\frac{0.60(0.40)}{500}}} = 2.19 $

The critical value for a one-tailed test at $\alpha = 0.05$ is $Z_{critical} = 1.645$

Step 3: Final Answer:
Since $Z = 2.19 > Z_{critical} = 1.645$, reject the null hypothesis

More than 60% of employees are satisfied with their job


Example 70: Two-Tailed T-Test for Independent Samples

Problem:
Two schools are compared based on average test scores. School A (20 students) has an average score of 80 with a standard deviation of 5. School B (25 students) has an average score of 85 with a standard deviation of 6. Test whether there is a significant difference in the average test scores at a 0.05 significance level.

Step 1: Given Data:
$n_1 = 20$
$\bar{x}_1 = 80$
$s_1 = 5$
$n_2 = 25$
$\bar{x}_2 = 85$
$s_2 = 6$
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the T-test formula for independent samples:
$ T = \frac{\bar{x}_1 – \bar{x}_2}{\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}} $
$ T = \frac{80 – 85}{\sqrt{\frac{5^2}{20} + \frac{6^2}{25}}} = -3.11 $

Degrees of freedom are approximated as $df = 43$

The critical value for a two-tailed test at $\alpha = 0.05$ is $T_{critical} = \pm 2.016$

Step 3: Final Answer:
Since $T = -3.11 < T_{critical} = -2.016$, reject the null hypothesis

There is a significant difference in the average test scores between the two schools


Example 71: Chi-Square Test for Independence

Problem:
A survey was conducted to test if there is a relationship between smoking and exercise habits. The data from 120 individuals is shown below:

SmokersNon-Smokers
Exercise3050
No Exercise1030

Test the hypothesis that smoking and exercise habits are independent at a 0.05 significance level.

Step 1: Given Data:
Observed frequencies are given in the table
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Chi-square formula for independence:
$ \chi^2 = \sum \frac{(O_i – E_i)^2}{E_i} $

Expected frequencies:

  • Total for Exercise: 80, Total for No Exercise: 40
  • Total for Smokers: 40, Total for Non-Smokers: 80

Expected frequency for Smokers, Exercise:
$ E_{Smokers,Exercise} = \frac{(40 \times 80)}{120} = 26.67 $

Expected frequency for Smokers, No Exercise:
$ E_{Smokers,NoExercise} = \frac{(40 \times 40)}{120} = 13.33 $

Expected frequency for Non-Smokers, Exercise:
$ E_{NonSmokers,Exercise} = \frac{(80 \times 80)}{120} = 53.33 $

Expected frequency for Non-Smokers, No Exercise:
$ E_{NonSmokers,NoExercise} = \frac{(80 \times 40)}{120} = 26.67 $

Now, calculate the Chi-square statistic:
$ \chi^2 = \frac{(30 – 26.67)^2}{26.67} + \frac{(50 – 53.33)^2}{53.33} + \frac{(10 – 13.33)^2}{13.33} + \frac{(30 – 26.67)^2}{26.67} = 0.42 + 0.21 + 0.83 + 0.42 = 1.88 $

Degrees of freedom $df = (2 – 1)(2 – 1) = 1$

The critical value for $\alpha = 0.05$ is $\chi^2_{critical} = 3.841$

Step 3: Final Answer:
Since $ \chi^2 = 1.88 < \chi^2_{critical} = 3.841 $, fail to reject the null hypothesis

Smoking and exercise habits are independent


Example 72: One-Tailed Z-Test for Population Mean

Problem:
A university claims that the average GPA of its students is at least 3.0. A sample of 50 students shows an average GPA of 2.85 with a population standard deviation of 0.3. Test the claim at a 0.01 significance level.

Step 1: Given Data:
$\bar{x} = 2.85$
$\mu = 3.0$
$\sigma = 0.3$
$n = 50$
$\alpha = 0.01$

Step 2: Solution:
The test statistic is calculated using the Z-test formula:
$ Z = \frac{\bar{x} – \mu}{\sigma / \sqrt{n}} $
$ Z = \frac{2.85 – 3.0}{0.3 / \sqrt{50}} = -3.54 $

The critical value for a one-tailed test at $\alpha = 0.01$ is $Z_{critical} = -2.33$

Step 3: Final Answer:
Since $Z = -3.54 < Z_{critical} = -2.33$, reject the null hypothesis

The average GPA is less than 3.0


Example 73: Two-Tailed T-Test for Population Mean

Problem:
A company claims that the average delivery time for its packages is 5 days. A sample of 15 deliveries has an average delivery time of 6 days with a standard deviation of 1.2 days. Test whether the population mean delivery time is significantly different from 5 days at a 0.05 significance level.

Step 1: Given Data:
$\bar{x} = 6$
$\mu = 5$
$s = 1.2$
$n = 15$
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the T-test formula:
$ T = \frac{\bar{x} – \mu}{s / \sqrt{n}} $
$ T = \frac{6 – 5}{1.2 / \sqrt{15}} = 3.23 $

Degrees of freedom $df = n – 1 = 14$

The critical value for a two-tailed test at $\alpha = 0.05$ is $T_{critical} = \pm 2.145$

Step 3: Final Answer:
Since $T = 3.23 > T_{critical} = 2.145$, reject the null hypothesis

The population mean delivery time is significantly different from 5 days


Example 74: Paired T-Test

Problem:
In a study of 12 people, cholesterol levels were measured before and after a 6-week diet program. The mean decrease in cholesterol levels was 15 mg/dL with a standard deviation of 3 mg/dL. Test whether the diet program significantly lowers cholesterol levels at a 0.01 significance level.

Step 1: Given Data:
$\bar{d} = 15$
$s_d = 3$
$n = 12$
$\alpha = 0.01$

Step 2: Solution:
The test statistic is calculated using the Paired T-test formula:
$ T = \frac{\bar{d}}{s_d / \sqrt{n}} $
$ T = \frac{15}{3 / \sqrt{12}} = 17.32 $

Degrees of freedom $df = n – 1 = 11$

The critical value for a one-tailed test at $\alpha = 0.01$ is $T_{critical} = 2.718$

Step 3: Final Answer:
Since $T = 17.32 > T_{critical} = 2.718$, reject the null hypothesis

The diet program significantly lowers cholesterol levels


Example 75: Chi-Square Test for Goodness of Fit

Problem:
A store manager claims that the demand for products is evenly distributed among three categories (A, B, and C). The observed demand for one month is:
Category A: 50, Category B: 60, Category C: 40.
Test the manager’s claim at a 0.05 significance level.

Step 1: Given Data:
Observed frequencies: $O_A = 50$, $O_B = 60$, $O_C = 40$
Expected frequency for each category: $E = \frac{150}{3} = 50$
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Chi-square formula:
$ \chi^2 = \sum \frac{(O_i – E_i)^2}{E_i} $
$ \chi^2 = \frac{(50 – 50)^2}{50} + \frac{(60 – 50)^2}{50} + \frac{(40 – 50)^2}{50} = 0 + 2 + 2 = 4 $

Degrees of freedom $df = 3 – 1 = 2$

The critical value for $\alpha = 0.05$ is $\chi^2_{critical} = 5.991$

Step 3: Final Answer:
Since $ \chi^2 = 4 < \chi^2_{critical} = 5.991 $, fail to reject the null hypothesis

The demand distribution is consistent with the manager’s claim


Example 76: One-Tailed Z-Test for Population Mean

Problem:
A restaurant claims that the average time customers spend at the restaurant is at least 90 minutes. A sample of 30 customers shows an average time of 85 minutes with a population standard deviation of 10 minutes. Test the claim at a 0.05 significance level.

Step 1: Given Data:
$\bar{x} = 85$
$\mu = 90$
$\sigma = 10$
$n = 30$
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Z-test formula:
$ Z = \frac{\bar{x} – \mu}{\sigma / \sqrt{n}} $
$ Z = \frac{85 – 90}{10 / \sqrt{30}} = -2.74 $

The critical value for a one-tailed test at $\alpha = 0.05$ is $Z_{critical} = -1.645$

Step 3: Final Answer:
Since $Z = -2.74 < Z_{critical} = -1.645$, reject the null hypothesis

The average time customers spend at the restaurant is less than 90 minutes


Example 77: Two-Tailed T-Test for Independent Samples

Problem:
Two training programs are tested for effectiveness. Group A (15 participants) has a mean improvement score of 8 with a standard deviation of 1.5. Group B (18 participants) has a mean improvement score of 7 with a standard deviation of 2. Test whether there is a significant difference between the two training programs at a 0.05 significance level.

Step 1: Given Data:
$n_1 = 15$
$\bar{x}_1 = 8$
$s_1 = 1.5$
$n_2 = 18$
$\bar{x}_2 = 7$
$s_2 = 2$
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the T-test formula for independent samples:
$ T = \frac{\bar{x}_1 – \bar{x}_2}{\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}} $
$ T = \frac{8 – 7}{\sqrt{\frac{1.5^2}{15} + \frac{2^2}{18}}} = 1.87 $

Degrees of freedom are approximated as $df = 31$

The critical value for a two-tailed test at $\alpha = 0.05$ is $T_{critical} = \pm 2.042$

Step 3: Final Answer:
Since $T = 1.87$ is less than the critical value, fail to reject the null hypothesis

There is no significant difference between the two training programs


Example 78: Chi-Square Test for Independence

Problem:
A company wants to know if there is a relationship between job type and job satisfaction. The following data is collected from 100 employees:

Job TypeSatisfiedUnsatisfied
Manager2010
Worker3040

Test the hypothesis that job type and job satisfaction are independent at a 0.05 significance level.

Step 1: Given Data:
Observed frequencies are given in the table
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Chi-square formula for independence:
$ \chi^2 = \sum \frac{(O_i – E_i)^2}{E_i} $

Expected frequencies:

  • Total for Manager: 30, Total for Worker: 70
  • Total for Satisfied: 50, Total for Unsatisfied: 50

Expected frequency for Manager, Satisfied:
$ E_{Manager,Satisfied} = \frac{(30 \times 50)}{100} = 15 $

Expected frequency for Manager, Unsatisfied:
$ E_{Manager,Unsatisfied} = \frac{(30 \times 50)}{100} = 15 $

Expected frequency for Worker, Satisfied:
$ E_{Worker,Satisfied} = \frac{(70 \times 50)}{100} = 35 $

Expected frequency for Worker, Unsatisfied:
$ E_{Worker,Unsatisfied} = \frac{(70 \times 50)}{100} = 35 $

Now, calculate the Chi-square statistic:
$ \chi^2 = \frac{(20 – 15)^2}{15} + \frac{(10 – 15)^2}{15} + \frac{(30 – 35)^2}{35} + \frac{(40 – 35)^2}{35} = 1.67 + 1.67 + 0.71 + 0.71 = 4.76 $

Degrees of freedom $df = (2 – 1)(2 – 1) = 1$

The critical value for $\alpha = 0.05$ is $\chi^2_{critical} = 3.841$

Step 3: Final Answer:
Since $ \chi^2 = 4.76 > \chi^2_{critical} = 3.841 $, reject the null hypothesis

Job type and job satisfaction are not independent


Example 79: One-Tailed Z-Test for Population Mean

Problem:
A school claims that the average height of its students is at least 150 cm. A sample of 40 students has an average height of 148 cm with a population standard deviation of 5 cm. Test the claim at a 0.05 significance level.

Step 1: Given Data:
$\bar{x} = 148$
$\mu = 150$
$\sigma = 5$
$n = 40$
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Z-test formula:
$ Z = \frac{\bar{x} – \mu}{\sigma / \sqrt{n}} $
$ Z = \frac{148 – 150}{5 / \sqrt{40}} = -2.53 $

The critical value for a one-tailed test at $\alpha = 0.05$ is $Z_{critical} = -1.645$

Step 3: Final Answer:
Since $Z = -2.53 < Z_{critical} = -1.645$, reject the null hypothesis

The average height of students is less than 150 cm


Example 80: Two-Tailed T-Test for Population Mean

Problem:
A sample of 30 factory workers has an average monthly production of 500 units with a sample standard deviation of 50 units. Test the hypothesis that the population mean monthly production is 550 units at a 0.01 significance level.

Step 1: Given Data:
$\bar{x} = 500$
$\mu = 550$
$s = 50$
$n = 30$
$\alpha = 0.01$

Step 2: Solution:
The test statistic is calculated using the T-test formula:
$ T = \frac{\bar{x} – \mu}{s / \sqrt{n}} $
$ T = \frac{500 – 550}{50 / \sqrt{30}} = -5.48 $

Degrees of freedom $df = n – 1 = 29$

The critical value for a two-tailed test at $\alpha = 0.01$ is $T_{critical} = \pm 2.756$

Step 3: Final Answer:
Since $T = -5.48 < T_{critical} = -2.756$, reject the null hypothesis

The population mean monthly production is significantly different from 550 units


Example 81: Paired T-Test

Problem:
In a study of 15 participants, their energy levels were measured before and after a new exercise program. The mean increase in energy levels was 7 points with a standard deviation of 1.8 points. Test whether the exercise program significantly increases energy levels at a 0.05 significance level.

Step 1: Given Data:
$\bar{d} = 7$
$s_d = 1.8$
$n = 15$
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Paired T-test formula:
$ T = \frac{\bar{d}}{s_d / \sqrt{n}} $
$ T = \frac{7}{1.8 / \sqrt{15}} = 12.42 $

Degrees of freedom $df = n – 1 = 14$

The critical value for a one-tailed test at $\alpha = 0.05$ is $T_{critical} = 1.761$

Step 3: Final Answer:
Since $T = 12.42 > T_{critical} = 1.761$, reject the null hypothesis

The exercise program significantly increases energy levels


Example 82: Chi-Square Test for Goodness of Fit

Problem:
A factory produces three types of products (X, Y, Z), and the management claims that the production is equally distributed among them. The observed production for one month is:
Product X: 45, Product Y: 35, Product Z: 40.
Test the claim at a 0.05 significance level.

Step 1: Given Data:
Observed frequencies: $O_X = 45$, $O_Y = 35$, $O_Z = 40$
Expected frequency for each product: $E = \frac{120}{3} = 40$
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Chi-square formula:
$ \chi^2 = \sum \frac{(O_i – E_i)^2}{E_i} $
$ \chi^2 = \frac{(45 – 40)^2}{40} + \frac{(35 – 40)^2}{40} + \frac{(40 – 40)^2}{40} = 0.625 + 0.625 + 0 = 1.25 $

Degrees of freedom $df = 3 – 1 = 2$

The critical value for $\alpha = 0.05$ is $\chi^2_{critical} = 5.991$

Step 3: Final Answer:
Since $ \chi^2 = 1.25 < \chi^2_{critical} = 5.991 $, fail to reject the null hypothesis

The production is equally distributed among products X, Y, and Z


Example 83: One-Tailed Z-Test for Population Proportion

Problem:
A survey of 600 people shows that 390 prefer to buy organic food. Test the hypothesis that more than 60% of people prefer organic food at a 0.05 significance level.

Step 1: Given Data:
$n = 600$
$p = \frac{390}{600} = 0.65$
$\pi_0 = 0.60$
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Z-test for proportions:
$ Z = \frac{p – \pi_0}{\sqrt{\frac{\pi_0(1 – \pi_0)}{n}}} $
$ Z = \frac{0.65 – 0.60}{\sqrt{\frac{0.60(0.40)}{600}}} = 2.57 $

The critical value for a one-tailed test at $\alpha = 0.05$ is $Z_{critical} = 1.645$

Step 3: Final Answer:
Since $Z = 2.57 > Z_{critical} = 1.645$, reject the null hypothesis

More than 60% of people prefer organic food


Example 84: Two-Tailed T-Test for Independent Samples

Problem:
Two departments in a company are being compared based on their average monthly sales. Department A (12 employees) has an average sales figure of $25,000 with a standard deviation of $3,000. Department B (15 employees) has an average sales figure of $28,000 with a standard deviation of $2,500. Test whether there is a significant difference in the average sales between the two departments at a 0.01 significance level.

Step 1: Given Data:
$n_1 = 12$
$\bar{x}_1 = 25,000$
$s_1 = 3,000$
$n_2 = 15$
$\bar{x}_2 = 28,000$
$s_2 = 2,500$
$\alpha = 0.01$

Step 2: Solution:
The test statistic is calculated using the T-test formula for independent samples:
$ T = \frac{\bar{x}_1 – \bar{x}_2}{\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}} $
$ T = \frac{25,000 – 28,000}{\sqrt{\frac{3,000^2}{12} + \frac{2,500^2}{15}}} = -3.47 $

Degrees of freedom are approximated as $df = 25$

The critical value for a two-tailed test at $\alpha = 0.01$ is $T_{critical} = \pm 2.787$

Step 3: Final Answer:
Since $T = -3.47 < T_{critical} = -2.787$, reject the null hypothesis

There is a significant difference in the average monthly sales between the two departments


Example 85: Chi-Square Test for Goodness of Fit

Problem:
A store manager claims that the sales of four types of products (A, B, C, D) are equally distributed. The observed sales for one month are:
Product A: 40, Product B: 30, Product C: 35, Product D: 45.
Test the manager’s claim at a 0.05 significance level.

Step 1: Given Data:
Observed frequencies: $O_A = 40$, $O_B = 30$, $O_C = 35$, $O_D = 45$
Expected frequency for each product: $E = \frac{150}{4} = 37.5$
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Chi-square formula:
$ \chi^2 = \sum \frac{(O_i – E_i)^2}{E_i} $
$ \chi^2 = \frac{(40 – 37.5)^2}{37.5} + \frac{(30 – 37.5)^2}{37.5} + \frac{(35 – 37.5)^2}{37.5} + \frac{(45 – 37.5)^2}{37.5} = 0.167 + 1.5 + 0.167 + 1.5 = 3.33 $

Degrees of freedom $df = 4 – 1 = 3$

The critical value for $\alpha = 0.05$ is $\chi^2_{critical} = 7.815$

Step 3: Final Answer:
Since $ \chi^2 = 3.33 < \chi^2_{critical} = 7.815 $, fail to reject the null hypothesis

The sales distribution is consistent with the manager’s claim


Example 86: One-Tailed Z-Test for Population Proportion

Problem:
A survey of 450 people shows that 300 prefer to shop online. Test the hypothesis that more than 65% of people prefer to shop online at a 0.05 significance level.

Step 1: Given Data:
$n = 450$
$p = \frac{300}{450} = 0.6667$
$\pi_0 = 0.65$
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Z-test for proportions:
$ Z = \frac{p – \pi_0}{\sqrt{\frac{\pi_0(1 – \pi_0)}{n}}} $
$ Z = \frac{0.6667 – 0.65}{\sqrt{\frac{0.65(0.35)}{450}}} = 0.59 $

The critical value for a one-tailed test at $\alpha = 0.05$ is $Z_{critical} = 1.645$

Step 3: Final Answer:
Since $Z = 0.59 < Z_{critical} = 1.645$, fail to reject the null hypothesis

There is not enough evidence to conclude that more than 65% of people prefer to shop online


Example 87: Two-Tailed T-Test for Independent Samples

Problem:
A hospital is comparing the effectiveness of two treatments. Group A (20 patients) has an average recovery time of 12 days with a standard deviation of 3 days. Group B (25 patients) has an average recovery time of 14 days with a standard deviation of 2.5 days. Test whether there is a significant difference in recovery time between the two treatments at a 0.01 significance level.

Step 1: Given Data:
$n_1 = 20$
$\bar{x}_1 = 12$
$s_1 = 3$
$n_2 = 25$
$\bar{x}_2 = 14$
$s_2 = 2.5$
$\alpha = 0.01$

Step 2: Solution:
The test statistic is calculated using the T-test formula for independent samples:
$ T = \frac{\bar{x}_1 – \bar{x}_2}{\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}} $
$ T = \frac{12 – 14}{\sqrt{\frac{3^2}{20} + \frac{2.5^2}{25}}} = -2.94 $

Degrees of freedom are approximated as $df = 43$

The critical value for a two-tailed test at $\alpha = 0.01$ is $T_{critical} = \pm 2.682$

Step 3: Final Answer:
Since $T = -2.94 < T_{critical} = -2.682$, reject the null hypothesis

There is a significant difference in recovery time between the two treatments


Example 88: Chi-Square Test for Independence

Problem:
A survey is conducted to determine if there is a relationship between gender and preference for a certain product (Product A or Product B). The following data is collected:

GenderProduct AProduct B
Male6040
Female5050

Test the hypothesis that gender and product preference are independent at a 0.05 significance level.

Step 1: Given Data:
Observed frequencies are given in the table
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Chi-square formula for independence:
$ \chi^2 = \sum \frac{(O_i – E_i)^2}{E_i} $

Expected frequencies:

  • Total for Product A: 110, Total for Product B: 90
  • Total for Males: 100, Total for Females: 100

Expected frequency for Male, Product A:
$ E_{Male,ProductA} = \frac{(100 \times 110)}{200} = 55 $

Expected frequency for Male, Product B:
$ E_{Male,ProductB} = \frac{(100 \times 90)}{200} = 45 $

Expected frequency for Female, Product A:
$ E_{Female,ProductA} = \frac{(100 \times 110)}{200} = 55 $

Expected frequency for Female, Product B:
$ E_{Female,ProductB} = \frac{(100 \times 90)}{200} = 45 $

Now, calculate the Chi-square statistic:
$ \chi^2 = \frac{(60 – 55)^2}{55} + \frac{(40 – 45)^2}{45} + \frac{(50 – 55)^2}{55} + \frac{(50 – 45)^2}{45} = 0.45 + 0.56 + 0.45 + 0.56 = 2.02 $

Degrees of freedom $df = (2 – 1)(2 – 1) = 1$

The critical value for $\alpha = 0.05$ is $\chi^2_{critical} = 3.841$

Step 3: Final Answer:
Since $ \chi^2 = 2.02 < \chi^2_{critical} = 3.841 $, fail to reject the null hypothesis

Gender and product preference are independent


Example 89: One-Tailed Z-Test for Population Mean

Problem:
A hotel claims that the average stay of its guests is at least 5 nights. A sample of 35 guests shows an average stay of 4.5 nights with a population standard deviation of 1 night. Test the claim at a 0.01 significance level.

Step 1: Given Data:
$\bar{x} = 4.5$
$\mu = 5$
$\sigma = 1$
$n = 35$
$\alpha = 0.01$

Step 2: Solution:
The test statistic is calculated using the Z-test formula:
$ Z = \frac{\bar{x} – \mu}{\sigma / \sqrt{n}} $
$ Z = \frac{4.5 – 5}{1 / \sqrt{35}} = -3.01 $

The critical value for a one-tailed test at $\alpha = 0.01$ is $Z_{critical} = -2.33$

Step 3: Final Answer:
Since $Z = -3.01 < Z_{critical} = -2.33$, reject the null hypothesis

The average stay of the guests is less than 5 nights


Example 90: Two-Tailed T-Test for Population Mean

Problem:
A company claims that the average work week for its employees is 40 hours. A sample of 20 employees has an average work week of 38 hours with a standard deviation of 3 hours. Test whether the population mean work week is significantly different from 40 hours at a 0.05 significance level.

Step 1: Given Data:
$\bar{x} = 38$
$\mu = 40$
$s = 3$
$n = 20$
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the T-test formula:
$ T = \frac{\bar{x} – \mu}{s / \sqrt{n}} $
$ T = \frac{38 – 40}{3 / \sqrt{20}} = -2.98 $

Degrees of freedom $df = n – 1 = 19$

The critical value for a two-tailed test at $\alpha = 0.05$ is $T_{critical} = \pm 2.093$

Step 3: Final Answer:
Since $T = -2.98 < T_{critical} = -2.093$, reject the null hypothesis

The population mean work week is significantly different from 40 hours


Example 91: Paired T-Test

Problem:
In a study of 10 employees, productivity scores were measured before and after implementing a new productivity tool. The mean increase in productivity was 12 points with a standard deviation of 3 points. Test whether the productivity tool significantly improves productivity at a 0.05 significance level.

Step 1: Given Data:
$\bar{d} = 12$
$s_d = 3$
$n = 10$
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Paired T-test formula:
$ T = \frac{\bar{d}}{s_d / \sqrt{n}} $
$ T = \frac{12}{3 / \sqrt{10}} = 12.65 $

Degrees of freedom $df = n – 1 = 9$

The critical value for a one-tailed test at $\alpha = 0.05$ is $T_{critical} = 1.833$

Step 3: Final Answer:
Since $T = 12.65 > T_{critical} = 1.833$, reject the null hypothesis

The productivity tool significantly improves productivity


Example 92: Chi-Square Test for Goodness of Fit

Problem:
A company claims that its four product lines (A, B, C, D) generate equal revenue. The observed revenues for one quarter are:
Product A: $40,000, Product B: $35,000, Product C: $30,000, Product D: $45,000.
Test the claim at a 0.05 significance level.

Step 1: Given Data:
Observed revenues: $O_A = 40,000$, $O_B = 35,000$, $O_C = 30,000$, $O_D = 45,000$
Expected revenue for each product: $E = \frac{150,000}{4} = 37,500$
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Chi-square formula:
$ \chi^2 = \sum \frac{(O_i – E_i)^2}{E_i} $
$ \chi^2 = \frac{(40,000 – 37,500)^2}{37,500} + \frac{(35,000 – 37,500)^2}{37,500} + \frac{(30,000 – 37,500)^2}{37,500} + \frac{(45,000 – 37,500)^2}{37,500} = 0.167 + 0.167 + 1.5 + 1.5 = 3.33 $

Degrees of freedom $df = 4 – 1 = 3$

The critical value for $\alpha = 0.05$ is $\chi^2_{critical} = 7.815$

Step 3: Final Answer:
Since $ \chi^2 = 3.33 < \chi^2_{critical} = 7.815 $, fail to reject the null hypothesis

The revenue distribution is consistent with the company’s claim


Example 93: One-Tailed Z-Test for Population Proportion

Problem:
A survey of 500 students shows that 325 believe in climate change. Test the hypothesis that more than 60% of students believe in climate change at a 0.05 significance level.

Step 1: Given Data:
$n = 500$
$p = \frac{325}{500} = 0.65$
$\pi_0 = 0.60$
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Z-test for proportions:
$ Z = \frac{p – \pi_0}{\sqrt{\frac{\pi_0(1 – \pi_0)}{n}}} $
$ Z = \frac{0.65 – 0.60}{\sqrt{\frac{0.60(0.40)}{500}}} = 2.23 $

The critical value for a one-tailed test at $\alpha = 0.05$ is $Z_{critical} = 1.645$

Step 3: Final Answer:
Since $Z = 2.23 > Z_{critical} = 1.645$, reject the null hypothesis

More than 60% of students believe in climate change


Example 94: Two-Tailed T-Test for Independent Samples

Problem:
Two groups of workers are tested for their work satisfaction. Group A (15 workers) has an average satisfaction score of 70 with a standard deviation of 5. Group B (20 workers) has an average satisfaction score of 65 with a standard deviation of 6. Test whether there is a significant difference in satisfaction scores between the two groups at a 0.05 significance level.

Step 1: Given Data:
$n_1 = 15$
$\bar{x}_1 = 70$
$s_1 = 5$
$n_2 = 20$
$\bar{x}_2 = 65$
$s_2 = 6$
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the T-test formula for independent samples:
$ T = \frac{\bar{x}_1 – \bar{x}_2}{\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}} $
$ T = \frac{70 – 65}{\sqrt{\frac{5^2}{15} + \frac{6^2}{20}}} = 2.87 $

Degrees of freedom are approximated as $df = 33$

The critical value for a two-tailed test at $\alpha = 0.05$ is $T_{critical} = \pm 2.035$

Step 3: Final Answer:
Since $T = 2.87 > T_{critical} = 2.035$, reject the null hypothesis

There is a significant difference in satisfaction scores between the two groups


Example 95: Chi-Square Test for Goodness of Fit

Problem:
A school administrator claims that students’ preferences for extracurricular activities are evenly distributed among sports, arts, and academic clubs. The observed preferences of 120 students are:
Sports: 50, Arts: 40, Academic Clubs: 30.
Test the claim at a 0.05 significance level.

Step 1: Given Data:
Observed frequencies: $O_{Sports} = 50$, $O_{Arts} = 40$, $O_{AcademicClubs} = 30$
Expected frequency for each category: $E = \frac{120}{3} = 40$
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Chi-square formula:
$ \chi^2 = \sum \frac{(O_i – E_i)^2}{E_i} $
$ \chi^2 = \frac{(50 – 40)^2}{40} + \frac{(40 – 40)^2}{40} + \frac{(30 – 40)^2}{40} = 2.5 + 0 + 2.5 = 5 $

Degrees of freedom $df = 3 – 1 = 2$

The critical value for $\alpha = 0.05$ is $\chi^2_{critical} = 5.991$

Step 3: Final Answer:
Since $ \chi^2 = 5 < \chi^2_{critical} = 5.991 $, fail to reject the null hypothesis

The preferences are consistent with the school administrator’s claim


Example 96: One-Tailed Z-Test for Population Proportion

Problem:
A poll of 600 people shows that 370 support a new law. Test the hypothesis that more than 60% of people support the new law at a 0.05 significance level.

Step 1: Given Data:
$n = 600$
$p = \frac{370}{600} = 0.6167$
$\pi_0 = 0.60$
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Z-test for proportions:
$ Z = \frac{p – \pi_0}{\sqrt{\frac{\pi_0(1 – \pi_0)}{n}}} $
$ Z = \frac{0.6167 – 0.60}{\sqrt{\frac{0.60(0.40)}{600}}} = 0.85 $

The critical value for a one-tailed test at $\alpha = 0.05$ is $Z_{critical} = 1.645$

Step 3: Final Answer:
Since $Z = 0.85 < Z_{critical} = 1.645$, fail to reject the null hypothesis

There is not enough evidence to conclude that more than 60% of people support the new law


Example 97: Two-Tailed T-Test for Independent Samples

Problem:
Two brands of shoes are tested for durability. Brand A (16 shoes) has a mean durability of 300 days with a standard deviation of 15 days. Brand B (20 shoes) has a mean durability of 310 days with a standard deviation of 20 days. Test whether there is a significant difference in durability between the two brands at a 0.01 significance level.

Step 1: Given Data:
$n_1 = 16$
$\bar{x}_1 = 300$
$s_1 = 15$
$n_2 = 20$
$\bar{x}_2 = 310$
$s_2 = 20$
$\alpha = 0.01$

Step 2: Solution:
The test statistic is calculated using the T-test formula for independent samples:
$ T = \frac{\bar{x}_1 – \bar{x}_2}{\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}} $
$ T = \frac{300 – 310}{\sqrt{\frac{15^2}{16} + \frac{20^2}{20}}} = -1.85 $

Degrees of freedom are approximated as $df = 34$

The critical value for a two-tailed test at $\alpha = 0.01$ is $T_{critical} = \pm 2.728$

Step 3: Final Answer:
Since $T = -1.85$ is less than the critical value, fail to reject the null hypothesis

There is no significant difference in durability between the two brands


Example 98: Chi-Square Test for Independence

Problem:
A researcher wants to test if there is a relationship between students’ year of study and their major (Science or Humanities). The following data is collected from 200 students:

YearScienceHumanities
Freshman6040
Senior5050

Test the hypothesis that year of study and major are independent at a 0.05 significance level.

Step 1: Given Data:
Observed frequencies are given in the table
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Chi-square formula for independence:
$ \chi^2 = \sum \frac{(O_i – E_i)^2}{E_i} $

Expected frequencies:

  • Total for Science: 110, Total for Humanities: 90
  • Total for Freshman: 100, Total for Senior: 100

Expected frequency for Freshman, Science:
$ E_{Freshman,Science} = \frac{(100 \times 110)}{200} = 55 $

Expected frequency for Freshman, Humanities:
$ E_{Freshman,Humanities} = \frac{(100 \times 90)}{200} = 45 $

Expected frequency for Senior, Science:
$ E_{Senior,Science} = \frac{(100 \times 110)}{200} = 55 $

Expected frequency for Senior, Humanities:
$ E_{Senior,Humanities} = \frac{(100 \times 90)}{200} = 45 $

Now, calculate the Chi-square statistic:
$ \chi^2 = \frac{(60 – 55)^2}{55} + \frac{(40 – 45)^2}{45} + \frac{(50 – 55)^2}{55} + \frac{(50 – 45)^2}{45} = 0.4545 + 0.5555 + 0.4545 + 0.5555 = 2.02 $

Degrees of freedom $df = (2 – 1)(2 – 1) = 1$

The critical value for $\alpha = 0.05$ is $\chi^2_{critical} = 3.841$

Step 3: Final Answer:
Since $ \chi^2 = 2.02 < \chi^2_{critical} = 3.841 $, fail to reject the null hypothesis

Year of study and major are independent


Example 99: One-Tailed Z-Test for Population Mean

Problem:
A restaurant claims that the average wait time for customers is at least 15 minutes. A sample of 25 customers shows an average wait time of 13 minutes with a population standard deviation of 4 minutes. Test the claim at a 0.05 significance level.

Step 1: Given Data:
$\bar{x} = 13$
$\mu = 15$
$\sigma = 4$
$n = 25$
$\alpha = 0.05$

Step 2: Solution:
The test statistic is calculated using the Z-test formula:
$ Z = \frac{\bar{x} – \mu}{\sigma / \sqrt{n}} $
$ Z = \frac{13 – 15}{4 / \sqrt{25}} = -2.5 $

The critical value for a one-tailed test at $\alpha = 0.05$ is $Z_{critical} = -1.645$

Step 3: Final Answer:
Since $Z = -2.5 < Z_{critical} = -1.645$, reject the null hypothesis

The average wait time is less than 15 minutes


Example 100: Two-Tailed T-Test for Population Mean

Problem:
A sample of 18 software engineers has an average monthly salary of $6,500 with a standard deviation of $600. Test the hypothesis that the population mean monthly salary is $7,000 at a 0.01 significance level.

Step 1: Given Data:
$\bar{x} = 6,500$
$\mu = 7,000$
$s = 600$
$n = 18$
$\alpha = 0.01$

Step 2: Solution:
The test statistic is calculated using the T-test formula:
$ T = \frac{\bar{x} – \mu}{s / \sqrt{n}} $
$ T = \frac{6,500 – 7,000}{600 / \sqrt{18}} = -3.74 $

Degrees of freedom $df = n – 1 = 17$

The critical value for a two-tailed test at $\alpha = 0.01$ is $T_{critical} = \pm 2.898$

Step 3: Final Answer:
Since $T = -3.74 < T_{critical} = -2.898$, reject the null hypothesis

The population mean monthly salary is significantly different from $7,000

adbhutah
adbhutah

adbhutah.com

Articles: 1279