Probability p=1/4=0.25; 1-p=0.75 the probability of having trouble sleeping.
Mean=5*0.25=1.25 average of people claiming to have no trouble sleeping.
Variance=5*0.25*0.75=0.9375, so standard deviation is sqrt(0.9375)=0.97 approx.
In the small sample the mean and standard deviation are respectively 1.25 and 0.97, which means that the expected results of a survey of 5 people lie in the range 1.25-0.97=0.28 and 1.25+0.97=2.22, i.e., between 0.28 and 2.22.
Binomial distribution is based on the expansion of (0.25+0.75)^5 which has coefficients 1 5 10 10 5 1 (Pascal).
The coefficients are applied to 0.25^(5-r)0.75^r, where r=0 to 5: for the purposes of comparison and for drawing a histogram, the values shown are multiples of 2^-10 (1/1024):
- All 5 claiming to have no trouble sleeping: 1 (r=0)
- 4 claiming and 1 not claiming: 5*(0.25^4)(0.75)=15 (r=1)
- 3 claiming and 2 not claiming: 90 (r=2)
- 2 claiming and 3 not claiming: 270
- 1 claiming and 4 not claiming: 405
- All not claiming: 243
The magnitude of these values can be applied to the length of blocks in a histogram. The peak is clearly (5) above. The average is 1024/5=204.8.