0
$\begingroup$

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.

$\endgroup$
  • 2
    $\begingroup$ Show your effort to use Plot and PDF with NormalDistribution. $\endgroup$ – Alan Sep 13 '18 at 21:18
  • $\begingroup$ You can obtain the percentages by using differences of the CDF of your distribution. $\endgroup$ – Henrik Schumacher Sep 14 '18 at 7:03
2
$\begingroup$
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}]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.