cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. ET on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
pcarroll1
Level IV

How can we determine the local maxima in a multi-peaked distribution?

We'd like to be able to determine the maximum values of multi-peaked distribution, such as the one below, with some algorithm or utility.

Any ideas how that can be done?

12998_pastedImage_1.png

1 ACCEPTED SOLUTION

Accepted Solutions
ian_jmp
Level X

Re: How can we determine the local maxima in a multi-peaked distribution?

If you get the number of peaks by inspection, you could try something like this:

NamesDefaultToHere(1);

// Make some random data (with known parameters)

d1 = J(40, 1, RandomNormal(0, 1));

d2 = J(60, 1, RandomNormal(4, 2));

d3 = J(30, 1, RandomNormal(-6, 1));

// Make a table

dt = AsTable(VConcat(d1, d2, d3));

dt << setName("A Mixture of Samples from Three Gaussians");

Column(dt, "Col1") << setName("Y");

// Do a 'Normal Mixtures' analysis

dt << Distribution(

Continuous Distribution(

Column( :Y ),

Vertical( 0 ),

Fit Distribution( Normal Mixtures( Clusters( 3 ) ) )

),

Histograms Only,

SendToReport(

Dispatch(

{"Y"},

"Distrib Histogram",

FrameBox,

{Frame Size( 600, 267 ), DispatchSeg( Hist Seg( 1 ), Bin Span( 2, 0 ) )}

)

)

);

View solution in original post

1 REPLY 1
ian_jmp
Level X

Re: How can we determine the local maxima in a multi-peaked distribution?

If you get the number of peaks by inspection, you could try something like this:

NamesDefaultToHere(1);

// Make some random data (with known parameters)

d1 = J(40, 1, RandomNormal(0, 1));

d2 = J(60, 1, RandomNormal(4, 2));

d3 = J(30, 1, RandomNormal(-6, 1));

// Make a table

dt = AsTable(VConcat(d1, d2, d3));

dt << setName("A Mixture of Samples from Three Gaussians");

Column(dt, "Col1") << setName("Y");

// Do a 'Normal Mixtures' analysis

dt << Distribution(

Continuous Distribution(

Column( :Y ),

Vertical( 0 ),

Fit Distribution( Normal Mixtures( Clusters( 3 ) ) )

),

Histograms Only,

SendToReport(

Dispatch(

{"Y"},

"Distrib Histogram",

FrameBox,

{Frame Size( 600, 267 ), DispatchSeg( Hist Seg( 1 ), Bin Span( 2, 0 ) )}

)

)

);

Recommended Articles