See all my videos at https://www.zstatistics.com/
0:42 INTRODUCTION
3:40 EXAMPLE 1 - Formal goodness of fit test (1 df)
17:02 ADVANCED - Where is the normal distribution hiding??
22:56 EXAMPLE 2 - Formal goodness of fit test (2 df)
Formula proof:
It actually exists neatly on the wikipedia page for the chi-squared distribution (https://en.wikipedia.org/wiki/Chi-squared_distribution#Introduction).
See the bottom of the introduction.