Hypotheses Test Examples

Hypotheses Test Examples

Here are some examples of hypothesis test for different types:

Example: Hospital [Single Mean (µ)]

A hospital wants to know if the average time that patients wait in the emergency room is less than 30 minutes. They take a random sample of 50 patients and find that the average waiting time is 27 minutes with a standard deviation of 5 minutes.

  • The null hypothesis (H0) is that the population mean waiting time is equal to 30 minutes. H0: µ = 30
  • The alternative hypothesis (Ha) is that it is less than 30 minutes. (Ha): µ < 30

Where: µ is the population mean waiting time in the emergency room for all patients.

They conduct a one-sample t-test to determine if the sample mean waiting time is significantly different from the hypothesized population mean of 30 minutes.

Example: Hospital [Paired Means (µd)]

A researcher wants to know if a new training program improves employee productivity. They measure the productivity of 20 employees before and after the training program.

  • The null hypothesis (H0) is that there is no difference in the mean productivity before and after the training program. H0: µ1 = µ2
  • Alternative hypothesis (Ha) is that there is an improvement.  Ha: µ1 < µ2

Where: µ1 is the population mean productivity before the training program µ2 is the population mean productivity after the training program

Same thing can be written in terms of µd, where µd = the mean difference between the before and after scores:

  • H0: µd = 0
  • Ha: µd ≠ 0

They conduct a paired t-test to determine if there is a significant difference in the mean productivity before and after the training program.

Example: Company [Single Proportion (p)]

A company wants to know if the proportion of defective products in a batch is greater than 5%. They take a random sample of 200 products and find that 15 of them are defective.

  • The null hypothesis (H0) is that the population proportion of defective products is equal to 5%. H0: p = 0.05
  • Alternative hypothesis (Ha) is that it is greater than 5%. Ha: p > 0.05

Where: p is the population proportion of defective products in the batch.

They conduct a one-sample proportion test to determine if the sample proportion of defective products is significantly different from the hypothesized population proportion of 5%.

Example: Company [Difference Between Two Independent Means (µ1-µ2)]

A researcher wants to know if there is a significant difference in the mean salary between male and female employees. They take a random sample of 50 male employees and 50 female employees and find that the mean salary for males is $50,000 with a standard deviation of $5,000, while the mean salary for females is $45,000 with a standard deviation of $6,000.

The null hypothesis is that there is no difference in the mean salary between males and females, and the alternative hypothesis is that there is a difference.

  • H0: µ1 = µ2
  • Ha: µ1 ≠ µ2

Where: µ1 is the mean salary of male employees µ2 is the mean salary of female employees

They conduct a two-sample t-test to determine if there is a significant difference in the mean salary between males and females.

Example: Company [Difference Between Two Proportions (p1-p2)]

A company wants to know if there is a significant difference in the proportion of customers who prefer their product compared to their competitor’s product. They survey 500 customers and find that 300 prefer their product, while 200 prefer the competitor’s product.

The null hypothesis is that there is no difference in the proportion of customers who prefer their product and the competitor’s product, and the alternative hypothesis is that there is a difference.

  • H0: p1 = p2
  • Ha: p1 ≠ p2

Where: p1 is the population proportion of customers who prefer the company’s product p2 is the population proportion of customers who prefer the competitor’s product

They conduct a two-sample proportion test to determine if there is a significant difference in the proportion of customers who prefer their product compared to their competitor’s product.

Example: Person’s age vs income [Simple Linear Regression Slope (β)]

A researcher wants to know if there is a significant linear relationship between a person’s age and their income. They collect data on the age and income of 100 people and conduct a simple linear regression analysis.

The null hypothesis is that there is no significant linear relationship between age and income, and the alternative hypothesis is that there is a significant linear relationship.

  • H0: β = 0
  • Ha: β ≠ 0

Where: β is the slope coefficient in the simple linear regression model between age and income.

They conduct a simple linear regression analysis to determine if there is a significant linear relationship between age and income.

Example: person’s height vs weight [Correlation (ρ)]

A researcher wants to know if there is a significant correlation between a person’s height and weight. They collect data on the height and weight of 50 people and calculate the correlation coefficient. The null hypothesis is that there is no significant correlation  between height and  weight and the alternative hypothesis is that there is a significant correlation.

  • H0: ρ = 0
  • Ha: ρ ≠ 0

Where: ρ is the population correlation coefficient between height and weight.

Hypotheses Test Examples

p-values