Shading Portions of a Normal Distribution

  • Thread starter Thread starter Nerdzoo
  • Start date Start date
N

Nerdzoo

I would like to shade portion(s) of a normal distribution. I am able t
create the standard normal curve, but would like to be able to shade
portion of it, say area greater than a z-score of 1.5, or area betwee
z of -1.0 and +1.0. Any pointer would be greatly appreciated
 
If you make the bell curve with a column chart, you can build it with two sets of
columns, and format them differently. See this page on conditional charting:

http://peltiertech.com/Excel/Charts/ConditionalChart1.html

You can achieve a similar effect with area charts, although it takes some gymnastics
to get a vertical cutoff.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______
 
I recently recommended the technique below to a researcher at one of
the CDCs who wanted to highlight different areas of two overlapping
normal curves.

As long as you have control over the generation of the points for the
curve, just add enough points so that the y-error bars constitute the
desired shading effect.

Suppose you have normal distribution (pdf) values corresponding to z=-4
to z=+4 in steps of 0.01. Suppose the z values are in col. A (rows
2:802 in my example) and the pdf values are in col. B. Then, find the
entry for z=-1. In that row, in col. C enter the formula =B{nnn} where
{nnn} is that row number. In my example, with the z=-1 value is in row
302 the formula in C302 will be =B302. Copy this cell down col. C all
the way until you get to the row for z=+1.

Now, plot A:B is a XY Scatter plot. Double-click the plotted series.
From the 'y error bars' tab select the 'Minus' option. In the Error
Amount section, in the Custom - field select the C range corresponding
to *all* the rows in the A:B columns (C2:C802 in my example). Since
all the cells except those corresponding to the range -1 to +1 are
empty, XL will only show error bars for the -1 to +1 range.

Double-click the error bars. Format as desired.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
 
Back
Top