Exploring lottery draw patterns using machine learning and stats, based on a Socrata dataset.
- Python
- Pandas for data manipulation
- Matplotlib for data visualization
- Scipy for chi-squared statistical tests
Create a username / password and app token for Socrata dataset use. See https://data.ny.gov/login for more
- Clone the repository
- Navigate to the project folder:
cd stats_puzzle
- Install the required packages:
pip install -r requirements.txt
- Run the
main.py
script to collect data:python main.py
- Run the
chi_tests.py
script for chi-squared tests:python chi_tests.py
- Data Collection: Gathers historical draw data for lottery numbers.
- Statistical Analysis: Performs chi-squared tests on the observed vs expected frequencies of lottery numbers.
- Data Visualization: Plots observed vs expected frequencies for both white balls and Powerballs.