In: Statistics and Probability
Develop two functions in R, one that generates s^2 using the formation definition, and one that calculates s^2 based on the hand calculation equation. Generate data from a normal distribution. Use your functions to calculate s^2 for your generated data. Try this for various variances so that your data become closer and closer to the mean (less variance). What do you find, comment.