We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
That standard deviation is for the entire student population (or rather those willing to stand in line for tickets). Making a histogram of the number of tickets desired by each student will produce a distribution centered at 2.4 with an "average" spread from that center of 2.0 (that is the root-mean-square average).
But we care about the distribution of the sample averages. Take all possible samples of 100 students, find the average number of desired tickets, and make a histogram of those. The center will still be 2.4, but the spread will be only 2.0/sqrt(100). (Central Limit Theorem: for samples of a fixed size, the standard deviation of sample averages is the population standard deviation divided by the square root of the sample size.) On an average, the differences, plus and minus, tend to cancel out, making the deviation smaller.
Except we don't really care about the average, we care about the total: 100*2.4, which will have a spread (standard deviation) of 100*2.0/sqrt(100) = 2.0*sqrt(100)
Notice that if we took just one student, and multiplied their order by 100, the standard deviation would be multiplied by 100. But with 100 different students, the deivations tend to cancel out producing a smaller standard deviation. (If you want to see the arithmetic, look up a proof of the central limit theorem. This part of it is not hard - it is the "almost normal" part that gets nasty!)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Day 4: The Central Limit Theorem #2
You are viewing a single comment's thread. Return to all comments →
Welcome Anshulgupta!
That standard deviation is for the entire student population (or rather those willing to stand in line for tickets). Making a histogram of the number of tickets desired by each student will produce a distribution centered at 2.4 with an "average" spread from that center of 2.0 (that is the root-mean-square average).
But we care about the distribution of the sample averages. Take all possible samples of 100 students, find the average number of desired tickets, and make a histogram of those. The center will still be 2.4, but the spread will be only 2.0/sqrt(100). (Central Limit Theorem: for samples of a fixed size, the standard deviation of sample averages is the population standard deviation divided by the square root of the sample size.) On an average, the differences, plus and minus, tend to cancel out, making the deviation smaller.
Except we don't really care about the average, we care about the total: 100*2.4, which will have a spread (standard deviation) of 100*2.0/sqrt(100) = 2.0*sqrt(100)
Notice that if we took just one student, and multiplied their order by 100, the standard deviation would be multiplied by 100. But with 100 different students, the deivations tend to cancel out producing a smaller standard deviation. (If you want to see the arithmetic, look up a proof of the central limit theorem. This part of it is not hard - it is the "almost normal" part that gets nasty!)