Hypothesis
Testing

Dr. Ajay Kumar Koli, PhD | SARA Institute of Data Science, India

NHST


Null Hypothesis Significance Testing.

Suggested Steps Before NHST:

  1. Understand the problem and data type.

  2. Visualize the data distribution.

  3. Calculate descriptive statistics.

  4. Formulate null and alternative hypotheses.

  5. Choose the appropriate test based on data type and assumptions.

Significance Level (\(\alpha\))


The threshold for rejecting the null hypothesis, commonly set at 0.05

Errors in Hypothesis Testing

Errors in Hypothesis Testing

  • Type I Error (\(\alpha\)): Rejecting a true null hypothesis (false positive).

  • Type II Error (\(\beta\)): Failing to reject a false null hypothesis (false negative).

Test Statistics

A numerical summary of data used to evaluate \(H_0\).

  • Example: \(t\)-statistic, \(z\)-statistic, or \(\chi^2\)-statistic

p-value

  • The probability of obtaining results as extreme as the obsereved data, assuming \(H_0\) is true.

  • Interpretation:

    • If \(p \; \le \; \alpha\): Reject \(H_0\). (significant result).

    • If \(p \; > \; \alpha\): Fail to reject \(H_0\). (insufficient evidence).

Assumptions of Statistical Tests

Understand the assumptions behind tests like \(t\)-test or ANOVA:

  • Normality: Data follows a normal distribution.

  • Independence: Observations are independent.

  • Homogeneity of Variance: Groups have equal variance (in some tests).

Types of Statistical Tests

Learn the purpose and application of key test:

  • \(t\)-test: Compare means (e.g., one sample, independent two-sample, paired).

  • ANOVA: Compare means across more than two groups.

  • \(\chi^2\)-Test: Test for independence in categorical data.

Effect Size

  • Measures the magnitude of an effect, independent of sample size.

    • Examples: Cohen’s \(d\), Pearson’s \(r\).
  • Essential for understanding the practical significance of results, beyond statistical significance.

Practice NHST

Test Scenario Statistical Test
One-Sample t-Test Compare a sample mean to a known value. t.test()
Two-Sample t-Test Compare means of two independent groups. t.test()
Chi-Square Test Test association between categorical variables. chisq.test()
ANOVA Compare means across multiple groups. aov()
Correlation Test Test the strength of the relationship between variables. cor.test()