Hi, any help is appreciated :)
I am trying to teach myself statistics. I've watched the Khan Academy Series on Chi square statistic for hypothesis testing (https://www.khanacademy.org/math/ap-statistics/chi-square-tests/chi-square-goodness-fit/v/chi-square-statistic)
After completing the multiple choice quizzes, I wanted to create an example of a usecase from my field and walk through the calculating chi square and determining goodness of fit.
Here's the assignment I made for myself:
1. Description of scenario
Education manager has historical enrollment data, showing the final student enrollment statuses on average are:
5% - transfer
10% - withdraw
20% - fail
65% - pass
Over the past two years, there have been organizational changes, so the manager wants to see if the seemingly improved pass rates are better than what we might expect by random chance, given the known distribution.
2. Sample Size, Does it pass the large counts condition?
Sample size will be 100, since that is the smallest sample that allows the expected count of 5 or higher.
3. Observed Counts (statistic)
transfer - 1 (1.6)
withdraw - 5 (2.5)
fail - 10 (5)
pass - 84 (5.55)
4. Chi Square Test Statistic
$\chi ^{2} = 14.65$
5. Test of Significance
df = 3
$\alpha = 0.05$
critical value = 7.815
$\chi ^{2} = 14.65 > 7.815$
So, the difference between the observed and expected values is significant
P-Value
$H_0 =$ the sample is from the distribution
$H_a =$ the sample is from a different distribution
$P = 0.002 < P=0.05$
6. Conclusion
Reject the null hypothesis. The observed scores are not from the same distribution. In plain speak, the differences that I am seeing in enrollment trends are significant.
Thank you

Chi-squared test for given probabilities
data: actual X-squared = 16.254, df = 3, p-value = 0.001006`
– Antoni Parellada Aug 02 '20 at 22:36expected_freqvector of data, whereas the vector labelledactualcontains the counts of students after the changes you made. Are my numbers concordant with yours? – Antoni Parellada Aug 02 '20 at 23:21