I have plotted the PDF of a particular function using

Plot[PDF[NormalDistribution[64, 8.5333333], x], {x, 20, 100}]

This gives the curve

Distribution of 8000 data points

I want to find the probability of finding a data point in a particular region of this graph by integrating the area under the curve. I want to do this for a small section of the graph only, i.e. for a small range of values of $A_i$. How do I go about this?

  • $\begingroup$ Try Quantile? $\endgroup$ Feb 16 '18 at 9:39

That's what CDF is good for!

f = PDF[NormalDistribution[64, 8.5333333]];
F = CDF[NormalDistribution[64, 8.5333333]];
F[b] - F[a]

returns the area of the graph of f between the points a and b.

  • $\begingroup$ So if I want to find how many of my 8000 data points are in a region I just do (F[b]-F[a])*8000? $\endgroup$
    – JJH
    Feb 16 '18 at 10:12
  • $\begingroup$ Yepp........... $\endgroup$ Feb 16 '18 at 20:01

You can use the CDF function, e.g.

(* 5% one-tail probability *)
x = Quantile[NormalDistribution[0, 1], 0.05]


Show[Plot[PDF[NormalDistribution[0, 1], a], {a, -4, 4},
  Ticks -> {{{-4, "μ - 4σ"}, {-2, "μ - 2σ"},
     {2, "μ + 2σ"}, {4, "μ + 4σ"}}, None}],
 Plot[PDF[NormalDistribution[0, 1], b], {b, -4, x},
  PlotStyle -> None, Filling -> Axis]]

enter image description here

CDF[NormalDistribution[0, 1], x]


CDF returns 5%.


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.