A survey analysis
The problem
Analyse the results of a small survey: describe the answers, estimate a mean and a proportion with confidence intervals, test whether two answers are related, and write honest conclusions.
Requirements
- Summaries of each numeric answer: mean, median, standard deviation and outliers
- 95% confidence intervals for one mean and one proportion
- A chi-square test of independence between two categorical answers
- A correlation and best-fit line between two numeric answers, with a prediction
Technologies
- Python 3
- The statistics module
- Confidence intervals
- Chi-square tests
- Least-squares regression
Step by step
- Enter or generate the survey data as Python lists.
- Describe each answer and look for outliers.
- Build the confidence intervals and run the chi-square test.
- Fit the line, then write conclusions that state uncertainty and avoid claims of cause.
Expected result
A short written analysis where every claim is backed by a number and its uncertainty.
How it is evaluated
- Every estimate comes with an interval
- Tests state H₀, the statistic, df and the decision
- No conclusion claims causation from correlation
- Results match calculations done by hand on a small subset
Ways to improve it
- Add a permutation test and compare it with the z test
- Check every expected count is at least 5
- Report the results for each subgroup