ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   How can I add a Gaussian curve to a histogram on Excel? (https://www.excelbanter.com/charts-charting-excel/46397-how-can-i-add-gaussian-curve-histogram-excel.html)

JC1379

How can I add a Gaussian curve to a histogram on Excel?
 
Trying to add a Gaussian (Normal Distribution) curve to a histogram, but I
dont know how. Any tips or advice?

Thanks

ExcelBanter AI

Answer: How can I add a Gaussian curve to a histogram on Excel?
 
To add a Gaussian curve to a histogram in Excel, follow these steps:
  1. Create your histogram in Excel by selecting your data and going to the "Insert" tab, then selecting "Histogram" from the "Charts" section.
  2. Calculate the mean and standard deviation of your data set using the AVERAGE and STDEV functions in Excel.
    For example:
    - Mean:
    Code:

    =AVERAGE(A1:A10)
    - Standard deviation:
    Code:

    =STDEV(A1:A10)
  3. Create a column of x-values for your Gaussian curve.
  4. Use the NORMDIST function in Excel to calculate the y-values for your Gaussian curve.
    For example: If your mean is in cell B1 and your standard deviation is in cell B2, you could use the following formula to calculate the y-value for an x-value of 50:
    Code:

    =NORMDIST(50,B1,B2,TRUE)
  5. Create a line chart from your x-values and y-values to display the Gaussian curve. Select your x-values and y-values, then go to the "Insert" tab and select "Line" from the "Charts" section. You may need to adjust the formatting of the chart to make it look the way you want.

Barb Reinhardt

This may help

http://www.tushar-mehta.com/excel/ch..._distribution/


"JC1379" wrote in message
...
Trying to add a Gaussian (Normal Distribution) curve to a histogram, but I
dont know how. Any tips or advice?

Thanks




Mike Middleton

JC1379 -

Trying to add a Gaussian (Normal Distribution) curve to a histogram, but I
dont know how. Any tips or advice? <


One way is to use a combination chart, with a Column chart type for the
vertical histogram bars and an XY (Scatter) chart type for the normal
density curve.

You could start with the chart generated by my free Better Histogram add-in,
available at www.treeplan.com, which produces a combination chart (so that
the horizontal axis is more properly labeled), and then you could change
that chart's XY (Scatter) data series to be based on worksheet data using
NORMDIST for the curve. You must be careful about scaling so that the Column
chart type and the XY (Scatter) chart type are aligned correctly.

- Mike
www.mikemiddleton.com



Ariel

How can I add a Gaussian curve to a histogram on Excel?
 
Mike,

I just downloaded your Better Histogram and the PDF. When I tried to overlay
a normal curve on the secondary axis (so that I can dispense with the
secondary axis line, etc.), it just didn't fit the curve over the entire
spectrum of values (those from the histogram on the primary axis)?

Any thoughts?

Thanks

Ariel

"Mike Middleton" wrote:

JC1379 -

Trying to add a Gaussian (Normal Distribution) curve to a histogram, but I
dont know how. Any tips or advice? <


One way is to use a combination chart, with a Column chart type for the
vertical histogram bars and an XY (Scatter) chart type for the normal
density curve.

You could start with the chart generated by my free Better Histogram add-in,
available at www.treeplan.com, which produces a combination chart (so that
the horizontal axis is more properly labeled), and then you could change
that chart's XY (Scatter) data series to be based on worksheet data using
NORMDIST for the curve. You must be careful about scaling so that the Column
chart type and the XY (Scatter) chart type are aligned correctly.

- Mike
www.mikemiddleton.com




Mike Middleton

How can I add a Gaussian curve to a histogram on Excel?
 
Ariel -

Appropriate scaling of all four axes is critical.

I do not have time to describe step-by-step instructions for the task, but I
have just posted an example worksheet of the results at
http://www.mikemiddleton.com (bottom left corner of the web page).

- Mike

"Ariel" wrote in message
...
Mike,

I just downloaded your Better Histogram and the PDF. When I tried to
overlay
a normal curve on the secondary axis (so that I can dispense with the
secondary axis line, etc.), it just didn't fit the curve over the entire
spectrum of values (those from the histogram on the primary axis)?

Any thoughts?

Thanks

Ariel

"Mike Middleton" wrote:

JC1379 -

Trying to add a Gaussian (Normal Distribution) curve to a histogram,
but I
dont know how. Any tips or advice? <


One way is to use a combination chart, with a Column chart type for the
vertical histogram bars and an XY (Scatter) chart type for the normal
density curve.

You could start with the chart generated by my free Better Histogram
add-in,
available at www.treeplan.com, which produces a combination chart (so
that
the horizontal axis is more properly labeled), and then you could change
that chart's XY (Scatter) data series to be based on worksheet data using
NORMDIST for the curve. You must be careful about scaling so that the
Column
chart type and the XY (Scatter) chart type are aligned correctly.

- Mike
www.mikemiddleton.com






Ariel

How can I add a Gaussian curve to a histogram on Excel?
 
Excellent, this is better than an explanation!

"Mike Middleton" wrote:

Ariel -

Appropriate scaling of all four axes is critical.

I do not have time to describe step-by-step instructions for the task, but I
have just posted an example worksheet of the results at
http://www.mikemiddleton.com (bottom left corner of the web page).

- Mike

"Ariel" wrote in message
...
Mike,

I just downloaded your Better Histogram and the PDF. When I tried to
overlay
a normal curve on the secondary axis (so that I can dispense with the
secondary axis line, etc.), it just didn't fit the curve over the entire
spectrum of values (those from the histogram on the primary axis)?

Any thoughts?

Thanks

Ariel

"Mike Middleton" wrote:

JC1379 -

Trying to add a Gaussian (Normal Distribution) curve to a histogram,
but I
dont know how. Any tips or advice? <

One way is to use a combination chart, with a Column chart type for the
vertical histogram bars and an XY (Scatter) chart type for the normal
density curve.

You could start with the chart generated by my free Better Histogram
add-in,
available at www.treeplan.com, which produces a combination chart (so
that
the horizontal axis is more properly labeled), and then you could change
that chart's XY (Scatter) data series to be based on worksheet data using
NORMDIST for the curve. You must be careful about scaling so that the
Column
chart type and the XY (Scatter) chart type are aligned correctly.

- Mike
www.mikemiddleton.com








All times are GMT +1. The time now is 03:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com