0

How would I go about creating a normal distribution graph with standard deviation given by

P[x_] = -x*Log2[x] - (1-x)*Log2[1-x] 

and mean 6? I want to manipulate the variable x. The chart should be from 0 to 6 + 3 * standard deviations. Also, how would I calculate the percentage of area in the chart from 0 - 1, 1 - 2, 2 - 3, and so forth.

For example, if I had a standard normal distribution curve, what would the area be from 0 to 1 standard deviation.

m_goldberg
  • 107,779
  • 16
  • 103
  • 257

1 Answers1

3
Manipulate[
 sigma = -q Log[2, q] - (1 - q) Log[2, 1 - q];
 Column[{CDF[NormalDistribution[6, sigma], xu] - 
         CDF[NormalDistribution[6, sigma], xl],
   Plot[PDF[NormalDistribution[6, sigma], x], {x, 0, 6 + 3 sigma},
    Epilog -> {Red, Dashed, Line[{{xl, 0}, {xl, 1}}], Blue, 
      Line[{{xu, 0}, {xu, 1}}]}]}, Center],
 {q, .1, .3},
 {{xl, 1}, 0, 6 + 3 sigma},
 {{xu, 8}, xl, 6 + 3 sigma}]
David G. Stork
  • 41,180
  • 3
  • 34
  • 96