Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Discussions
- :
- Re: is there a way to find the area common to two different normal distribution ...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

is there a way to find the area common to two different normal distribution curve using JMP?

Sep 23, 2016 10:25 AM
(1799 views)

I am trying to find the area under the common portion of two different normal distribution curve. How can I do that using JMP? Any simple way to do so?

3 REPLIES 3

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: is there a way to find the area common to two different normal distribution curve using JMP?

Sep 23, 2016 3:38 PM
(1746 views)
| Posted in reply to message from gupta_gyanesh_y 09/23/2016 01:25 PM

In JMP 12 there is an quite efficient Integrate() function that can be used for calculating the area confined by the minimum of the two curves.

The example below is not very useful (you'd probably want to get the parameters from the distribution platform) but may give you some ideas...

Names Default To Here**(****1****)**;

// Define curves and calculate overlap area

N1 = Expr**(**Normal Density**(**x, **1**, **2****))**;

N2 = Expr**(**Normal Density**(**x, **0**, **1****))**;

ovl = Integrate**(**Min**(**N1, N2**)**, x, **.**, **.****)**;

Show**(**ovl**)**;

//––––––––––

// Illustration

ym = xm = **(**-**500** :: **500****)** / **100**;

For**(**i = **1**, i <= N Col**(**xm**)**, i++,

ym**[**i**]** = Min**(**Normal Density**(**xm**[**i**]**, **1**, **2****)**, Normal Density**(**xm**[**i**]**, **0**, **1****))**

**)**;

New Window**(**"Overlap Coefficient",

y = Graph Box**(**

Y Scale**(****0**, **1****)**,

X Scale**(**-**5**, **5****)**,

Y Function**(**N1, x**)**;

Y Function**(**N2, x**)**;

Text**({****0**, **0.6****}**, "OVL = ", ovl**)**;

Fill Color**(****1****)**;

Polygon**(**xm, ym**)**;

**)**

**)**;

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: is there a way to find the area common to two different normal distribution curve using JMP?

@ms Thanks for sharing this! I checked this script against an example given on the following website thanks to a colleague of mine: https://stats.stackexchange.com/questions/103800/calculate-probability-area-under-the-overlapping-ar...

With the mean and sigma parameters for the first and second distributions respectively:

*"For your example, with μ1=5.28,μ2=8.45,σ1=0.91,σ2=1.36μ1=5.28,μ2=8.45,σ1=0.91,σ2=1.36, this yields: c=6.70458...c=6.70458..., and the area of the green section is: 0.158413" *

The .JSL script gives the exact same result for the area of the overlapped section!

```
Names Default To Here(1);
// Define curves and calculate overlap area
mean1 = 5.28;
stdev1 = 0.91;
mean2 = 8.45;
stdev2 = 1.36;
N1 = Expr(Normal Density(x, mean1, stdev1));
N2 = Expr(Normal Density(x, mean2, stdev2));
ovl = Integrate(Min(N1, N2), x, ., .);
Show(ovl);
//––––––––––
// Illustration
ym = xm = (-1000 :: 1000) / 100;
For(i = 1, i <= N Col(xm), i++,
ym[i] = Min(Normal Density(xm[i], mean1, stdev1), Normal Density(xm[i], mean2, stdev2))
);
New Window("Overlap Coefficient",
y = Graph Box(
Y Scale(0, 1),
X Scale(-5, 12),
Y Function(N1, x);
Y Function(N2, x);
Text({0, 0.6}, "OVL% = ", ovl*100);
Fill Color(1);
Polygon(xm, ym);
)
);
```

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: is there a way to find the area common to two different normal distribution curve using JMP?

Dec 22, 2018 5:23 AM
(445 views)
| Posted in reply to message from PatrickGiuliano 12/21/2018 10:50 PM