Skip to content

astamkad/AB_Test

Repository files navigation

A/B Test: Quiz Version Comparison

This project explores whether a new version of a quiz (Version B) leads to significantly higher student scores compared to the original version (Version A). The A/B test was conducted on 100 students, randomly assigned to one of the two versions.


Objective

To determine if Quiz Version B improves student performance compared to Quiz Version A using a randomized A/B testing framework and statistical analysis.


Methodology

  1. Group Assignment

    • 100 students were randomly assigned to Group A or B using set.seed(42) for reproducibility.
    • Assignment was saved in group_assignment.csv.
  2. Quiz Administration

    • Students received different versions of the quiz based on their group.
    • Scores were recorded and added to the CSV (group_assignment_with_scores.csv).
  3. Analysis

    • An independent two-sample t-test was conducted to compare average scores.
    • A boxplot was generated to visualize score distribution.

Project Structure

AB_Test/
├── data/
│   ├── group_assignment.csv
│   └── group_assignment_with_scores.csv
├── output/
│   ├── score_boxplot.png
│   └── ttest_results.txt
├── scripts/
│   ├── 01_assign_groups.R
│   └── 02_analyze_results.R

Results

Mean Scores

  • Group A: 74.06
  • Group B: 78.89

Welch Two-Sample t-test

t = -2.6797, df = 97.338, p-value = 0.008653
95% CI: [-8.41, -1.25]
  • Statistically significant difference (p < 0.05)
  • Conclusion: Version B resulted in significantly higher quiz scores.

Visualization

Boxplot


Tools Used

  • R (base, dplyr, ggplot2)
  • RStudio
  • Git/GitHub for version control

How to Reproduce

  1. Clone the repo
  2. Open in RStudio
  3. Run 01_assign_groups.R to generate student group assignments
  4. Add scores to group_assignment_with_scores.csv
  5. Run 02_analyze_results.R for analysis and plots

Author

Asta Musa
Monitoring, Evaluation & Data Analytics Specialist
LinkedIn | GitHub

About

This project investigates whether a new quiz version improves student performance using A/B testing. Students were randomly assigned to two groups, given different quiz versions, and their scores analyzed using a t-test and visualization in R. Results show a statistically significant improvement.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages