AWS Certified Machine Learning – SpecialtyExploratory Data AnalysisMedium

A data scientist is analyzing a dataset of customer purchase histories. They want to understand if there is a statistically significant difference in the average purchase amount between customers who used a promotional code and those who did not. The purchase amounts are normally distributed, and the sample sizes for both groups are large. Which statistical test should be used?

  1. AIndependent Samples t-test
  2. BPaired Samples t-test
  3. CANOVA
  4. DChi-squared Test of Independence
Show answer & explanation

Correct answer: A. Independent Samples t-test

An Independent Samples t-test is appropriate for comparing the means of two independent groups when the data is normally distributed and sample sizes are sufficiently large.

Why the other options are wrong

  • B. Paired Samples t-test is used when the two groups are dependent or related (e.g., before and after measurements).
  • C. ANOVA (Analysis of Variance) is used to compare means of three or more groups, not just two.
  • D. Chi-squared Test of Independence is used for categorical variables, not for comparing means of continuous variables.

Independent Samples t-test

A statistical hypothesis test used to determine if there is a significant difference between the means of two independent groups on a continuous dependent variable.

  • Compares means of exactly two groups.
  • Groups must be independent.
  • Dependent variable must be continuous and approximately normally distributed.
  • Assumes equal variances (or uses Welch's t-test if not).

Memory trick: Two means, independent groups? T-test takes the lead!

More Exploratory Data Analysis questions