I'm reading Linear Regression and correlation by Scott Hartshorn. There is Regression example for a television show Modern Family. We calculated equation for a regression line to predict number of viewers of that show. Then there is the example predicting errors between predicted number of viewers and actual value. So we have
____________________________________________________________________________
|Normalized | Predicted normalized | Regression error |
|viewers (Nv) | viewers with our Regression line(PNv) | (PNv - Nv) |
|____________________________________________________________________________|
|1 | 0.915 | -0.085 |
|0.79 | 0.907 | 0.114 |
|... | ... | ... |
|_____________|_________________________________________|____________________|
We made a histogram of the regression errors.
Then the author drew normal curve(it is on the histogram). And I don't understand the formula is being used to draw that curve.
We have standard deviation of Regression errors = 0.074 There is table with data for provided histogram above.
_______________________________________________________________________________
Histogram bin index | Histogram bins | Normal curve |
______________________|___________________|____________________________________|
1 | -0.2 | =NORM.S.DIST(-0.2/0.074, 0)* |
| | Number_of_episodes*(0.02/0.074)=0.458 |
______________________|___________________|____________________________________|
2 | -0.18 | =NORM.S.DIST(-0.18/0.074, 0)* |
| | Number_of_episodes*(0.02/0.074)=0.9194 |
... | ... | ... |
______________________|___________________|____________________________________|
Per my understanding normal curve consists of product of 3 parts:
- NORM.S.DIST(-0.2/0.074, 0) That excel function is used to calculate probability density function value for standard distribution. -0.2/0.074 - Z score and 0 - is just a marker that we need to use density.
2.Number_of_episodes as far as I understand it is size of sample. It is sum of values from y axis on the histogram above.
3.(0.02/0.074) not sure what it is. Based on the table and graph above, 0.02 is distance between bins on histogram. 0.074 is standard deviation.
Can you please explain what is the formula being used by author to calculate normal curve? I though that NORM.S.DIST(-0.2/0.074, 0) is enough.
I'm kind of newbie in statistic and probability, sorry if I missed some data to be shown. I will edit the message and add it.