Single-sample hypothesis tests

Single-sample hypothesis tests

Understanding Hypothesis Testing

  • Hypothesis testing is a statistical method that is used in making statistical decisions using experimental data.
  • It involves testing the validity of a claim that is made about a population. This claim, which we’ll call an assumption or a hypothesis, could be that the average age of all people in town X is 35 years.

Steps in Hypothesis Testing

  • The first step in hypothesis testing is to specify the two hypotheses. There are two types of hypotheses: the null hypothesis (H0) and the alternative hypothesis (Ha).
  • The null hypothesis states that there is no effect or difference or, more specifically, it makes a statement about some population parameter that could very well be true.
  • The alternative hypothesis is the exact opposite of what we state in the null hypothesis. It represents a statement we’re trying to prove evidence against in our test.

Single-sample Hypothesis Test

  • A single-sample hypothesis test is used when we want to know whether our sample including measurements of a variable of interest (years of age, for example) differs significantly from the population.
  • The sample mean is compared with the population mean to test if they are significantly different.

Conducting a Single-sample Hypothesis Test

  • In order to conduct a single-sample hypothesis test, the following steps are taken:
    • Formulate the null and the alternative hypothesis.
    • Decide on the significance level, α. This is the likelihood of rejecting the null hypothesis when it is in fact true. Commonly, it is set as 0.05 or 5% which means your output should be 95% confident to give a conclusion of acceptance or rejection.
    • Calculate the test statistic (Z or t) depending on whether population standard deviation is known or not known, respectively. A test statistic is a standardized value that is calculated from sample data during a hypothesis test. It is used in making decisions about the null hypothesis.
    • Compare test statistic to the critical value (from Z or t distribution at the assigned α). If test statistic exceeds the critical value, one would reject the null hypothesis.

Interpretation of Results

  • The output (p-value) of the test is probability of getting a sample like yours if the null hypothesis is true.
  • If p ≤ α, we reject the null hypothesis and conclude that our evidence supports the alternative hypothesis.
  • If p > α, we fail to reject the null hypothesis and conclude that we do not have enough evidence to support the alternative hypothesis.