This project tests a real-life hypothesis using basic statistical analysis in Go:
Hypothesis: "Fiction books are cheaper than Non Fiction books."
We perform a z-test on book price data from Kaggle to confirm or reject this hypothesis using real-world data.
HypothesisTestDataAnalysis/
βββ cmd/
β βββ main.go
βββ internal/
β βββ analysis.go
βββ bestsellers with categories.csv
βββ go.mod
βββ README.md
- Go 1.18 or higher
- Git (optional)
- Dataset: Amazon Top 50 Bestselling Books 2009β2019
- Clone the project (or download ZIP):
git clone https://github.com/meruyert4/HypothesisTestDataAnalysis.git
cd HypothesisTestDataAnalysisgo run cmd/main.goYou should see output like:
π Fiction Avg Price: $10.85 (240 books)
π Non Fiction Avg Price: $14.84 (310 books)
Z-score: -4.55 β Reject Hβ. Fiction books are significantly cheaper. β
Sootla, S. (2020). Amazon Top 50 Bestselling Books 2009β2019 [Data set]. Kaggle. π https://www.kaggle.com/datasets/sootersaalu/amazon-top-50-bestselling-books-2009-2019
- This project uses population standard deviation.
- Z-score interpretation uses a one-tailed test at 95% confidence (threshold: -1.645).