Miscellaneous: Statistical Testing

Hypothesis Testing

Basics

  • Testing Used to Determine the Significance of a Result
  • Tests Obtain a p-Value (Probability of Obtaining a Test Result by Random if the Null Hypothesis is Correct)
  • Types of Variables:
    • Quantitative – Numerical/Numbers
      • Continuous: Range (e.g. Age)
    • Qualitative – Categorical/Descriptive
      • Binary: Two Options (e.g. Sex)
      • Ordinal: More Than Two Options That Are Ranked (e.g. Pain Scale)
      • Nominal: Naming (e.g. Blood Type)
  • Types of Tests:
    • Parametric – Assume Statistical Distributions
    • Nonparametric – Do Not Rely on Any Statistical Distributions

Quantitative-Parametric Variables:

  • Student’s T-Test:
    • Paired T-Test: Matched Samples or Paired Values from a Single Group
      • First Find the Difference Between the Matched Values
      • Calculate the Average & Standard Deviation of Those Differences
      • Then Calculate the Test Statistic “t”
      • Use “t” in a Reference Table to Calculate the p-Value
    • Independent T-Test: Compares 2 Independent Groups
      • For Each Group – Calculate the Average & Standard Error
      • Then Calculate the Test Statistic “t”
      • Use “t” in a Reference Table to Calculate the p-Value
  • ANOVA (Analysis of Variance): Compares > 2 Groups
  • Z-Test: Similar to T-Test but for Larger Populations

Quantitative-Nonparametric Variables

  • Wilcoxon Signed-Rank Test: Matched Samples or Paired Values from a Single Group
    • First Assign Pairs a “Sign” (+1 if Difference is Positive, -1 if Difference is Negative)
    • Calculate the Absolute Difference of Each Pair & Rank by Ascending Order (1,2,3…)
    • Then Calculate the Test Statistic “W” by Adding All of the (Sign x Rank) Values for Each Pair
    • Use “W” in a Reference Table to Calculate the p-Value
  • Mann-Whitney U Test/Wilcoxon Rank-Sum Test: Compares 2 Independent Groups
    • First Rank All Values of Both Groups by Ascending Order (1,2,3…)
    • Calculate the Rank-Sum “R” by Adding All of the Ranks in Each Separate Group
    • Then Calculate the Test Statistic “U” for Each Separate Group
    • Use the Smallest “U” in a Reference Table to Calculate the p-Value
  • Kruskal-Wallis Test: Compares > 2 Groups

Qualitative Variables

  • Chi-Squared Test: Compares Qualitative Variables
    • Variations:
      • Pearson’s Chi-Squared Test
      • Fisher’s Exact Test
      • McNemar’s Test

Comparison Mn

Groups Parametric Nonparametric Qualitative
1 (Paired) Paired T-Test Wilcoxon Signed-Rank Chi-Squared
2 Independent T-Test Mann-Whitney U
(Wilcoxon Rank-Sum)
> 2 ANOVA Kruskal-Wallis

Error

  • Hypothesis:
    • Hypothesis: States that There is a Difference Between the Groups
    • Null Hypothesis: States that There is No Difference Between the Groups
  • Types: Mn
    • Type I Error: Incorrectly Rejects the Null Hypothesis
    • Type II Error: Incorrectly Accepts the Null Hypothesis
  • Avoid Error by Increasing Sample Size

Other Tests

Regression

  • Regression: Used to Predict the Value of a Dependent Variable from One or More Independent Variables
  • Types of Regression:
    • Linear Regression: Compare Independent Variables to a Single Continuous Dependent Variable
      • Simple Linear Regression: Uses a Single Independent Variables
      • Multiple Linear Regression: Uses Multiple Independent Variables
    • Logistic Regression: Compare Independent Variables to a Single Categorical Dependent Variable
      • Simple Logistic Regression: Uses a Single Independent Variables
      • Multiple Logistic Regression: Uses Multiple Independent Variables

Survival Analysis

  • Survival Analysis: Statistical Approaches to Determine the Time-to-Event (Survival/Death)
  • Functions:
    • Survival Function S(t): Probability of Survival to a Given Time
    • Hazard Function h(t): Event (Death) Rate Over a Specific Time Period Given Survival to the Beginning of the Time Period
  • Types of Survival Analysis:
    • Kaplan-Meier Curve/Plot: Estimates a Survival Curve Over Time
    • Log-Rank Test: Compares the Survival Curves of at Least Two Groups
    • Cox Proportional Hazards Model (Cox Regression): Compares the Effect of Multiple Variables from Time-to-Event

Mnemonics

Basic Statistical Tests

  • Parametric Tests:
    • Student’s T-Test are Easy for Students – The Basic Parametric Tests (Paired & Independent
    • ANOVA – NOVA PBS Series from School was Scientific & Complex – Used for Multiple Groups
  • Nonparametric Tests:
    • Nonparametric Tests Are All Named After People
    • Differentiating the Wilcoxon Tests: “Signed-Rank” Requires the “Sign” from Comparing Two Paired Values
    • Mann-Whitney U (Two “n”s in Mann) is Another Name of Wilcoxon Rank-Sum for “2” Groups
    • Kruskal-Wallis is the Only Other Nonparametric Test – Rule Out Others
  • Qualitative Tests:
    • Chi-Squared: “Chi” Tea is Drank by Hippies Who Would Rather Look at “Qualities” than Hard Numbers

Types of Error

  • Type I: Celebrate Too Soon
  • Type II: Didn’t Celebrate When Should Have