Normal Distribution Curve

I was looking on here for a way to create a normal distribution curve in numbers. I could not really find any clear and obvious way to do it, so I have documented the method here. It really is quite simple.


In column A starting with -4.0 in cell A2 put -3.9 in cell A3 and so on through to +4.0 (Cell A82)

Copy and paste the following formula into cell B2


=(1/(SQRT(2*PI()))*(EXP(-0.5*(B3^2))))


copy and paste this down to cell B82


Select B2:B82 then create a line graph (Charts, line graph)


Open the inspectr and select the graph option. Highlight the graph option, click axis and select the labels on the X-axis. Replace the text in the labels box with the following


"-3 SD","","","","","","","","","","","","","","-2 SD","","","","","","","","","","","","","-1 SD","","","","","","","","","","","","","","Mean","","","","","","","","","","" ,"","","+1 SD","","","","","","","","","","","","","+2 SD","","","","","","","","","","","","","+3 SD"


this then produces a normal distribution curve.


hope this helps someone else.

MacBook Pro (13-inch Mid 2009), Mac OS X (10.7.3)

Posted on Feb 22, 2012 12:57 PM

Reply
9 replies

Mar 22, 2017 10:17 PM in response to tiemle

Hi tiemle,

May be a bit off topic, there is an alternative if you just want to see graph of formulas. Try "Grapher" instead.

It gives you a graph for a formula (or more) with less hassle.

For this case,

  1. Invoke Grapher ( Applications > Utilities )
  2. Choose 2D Graph > [default]
  3. As new window open with cursor next to "y=".
  4. Type in the formula there such as, "5 * exp(-0.5x^2)", move cursor right of closing parenthesis, "/sqrt(2pi)", then hit return. (without double quotes)

You'll see the graph as below. (window size is adjusted to post here)

User uploaded file

Then you can manipulate it ( zoom in/out, move with hand tool, change color with inspector, etc ).

Mar 22, 2017 9:38 PM in response to tiemle

Hi tiemle,


Formulas do not return graphs, they return results of the formula, which are generally numeric values, text values, or other types of values. Given the input values in column B of the table, the results of the formula in my post above are shown in columns C and D of the table:

User uploaded file

The chart, an X-Y scatter graph with a shared set of X values and two series of Y values, is constructed from the values in the three columns.


For a single set of X-Ypairs (such as the paired sets in columns B and C), select the two columns, then choose the Scatter chart from the Charts button in the toolbar.


The result should be a chart resembling the blue line in the chart shown.


(Be aware that only a portion of the data used is shown in portion of the table visible in the image.)


Rgards,

Barry

Feb 22, 2012 1:12 PM in response to Wayne Contello

Thanks Wayne, I appreciate the help. I saw the function but wasn't sure how to employ it, so I went back to the formula for a basic Gaussian distribution.


I have tried this formula but what I end up with is a cumulative frequency chart, not a normal distribution curve. I guess there is an intermediate step, and rather than spend time working that out I went back to basics.

Feb 22, 2012 10:47 PM in response to TimAkerman

TimAkerman wrote:

I have tried this formula but what I end up with is a cumulative frequency chart, not a normal distribution curve. I guess there is an intermediate step, and rather than spend time working that out I went back to basics.

Why 'guess'? Apple provides two easily readable and very useful resources listing all of the functions supported in Numbers, with a description of each, a statement of the syntax, and at lest one example of how to use the function.


One the the iWork Formulas and Functions User Guide, a fully searchable PDF document which you may download via the Help menu in Numbers '09. (While you're there, you might also want to download the Numbers '09 User Guide, extremely useful to anyone new to Numbers, and well worth the time spent reading at least the first few chapters.


The second resource for using functions in the built in Function Browser. In Numbers, click the yellow ƒx button in the tool bar, and choose Show function Browser. Searchable by function name, shows a list of related functions, provides the same description and syntax statement as the F&F user guide.


Searching the User Guide for 'normal dis', you's get a list of about a dozen hits, including this entry for NORMDIST. Here's the first three lines from that entry:


NORMDIST

The NORMDIST function returns the normal distribution of the specified function form.

NORMDIST(num, average, stdev, form-type)


The third argument, form-type, determines whether the function returns the 'cumulative distribution form' (rising curve), or the 'probability density form' (the familiar bell curve).


Here's an example, showing only the first 21 x values in Tim's set, and the results for the NORMDIST function in both modes. Average is 0, Standard deviation is 1:


Blue: =NORMDIST(B,0,1,FALSE) (probability density)

Green: =NORMDIST(B,0,1,TRUE) (cumulative distribution)

User uploaded file


Regards,

Barry

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Normal Distribution Curve

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.