<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to get exact cumulative Prob at specified value in CDF Plot? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-get-exact-cumulative-Prob-at-specified-value-in-CDF-Plot/m-p/777208#M95851</link>
    <description>&lt;P&gt;wow, that's powerful!&lt;/P&gt;</description>
    <pubDate>Mon, 29 Jul 2024 14:10:09 GMT</pubDate>
    <dc:creator>hogi</dc:creator>
    <dc:date>2024-07-29T14:10:09Z</dc:date>
    <item>
      <title>How to get exact cumulative Prob at specified value in CDF Plot?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-exact-cumulative-Prob-at-specified-value-in-CDF-Plot/m-p/777147#M95834</link>
      <description>&lt;P&gt;For attached example, how to get the exact cumulative Prob at specified value(500) in CDF Plot?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChernoffTurtle7_0-1722227853858.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/66569iF853436BCFAC23FE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChernoffTurtle7_0-1722227853858.png" alt="ChernoffTurtle7_0-1722227853858.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2024 04:38:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-exact-cumulative-Prob-at-specified-value-in-CDF-Plot/m-p/777147#M95834</guid>
      <dc:creator>ChernoffTurtle7</dc:creator>
      <dc:date>2024-07-29T04:38:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to get exact cumulative Prob at specified value in CDF Plot?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-exact-cumulative-Prob-at-specified-value-in-CDF-Plot/m-p/777169#M95836</link>
      <description>&lt;P&gt;One option is to use Crosshair toolbar tool&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1722229523647.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/66570iFD06548A1752CF29/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1722229523647.png" alt="jthi_0-1722229523647.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2024 05:06:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-exact-cumulative-Prob-at-specified-value-in-CDF-Plot/m-p/777169#M95836</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-07-29T05:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to get exact cumulative Prob at specified value in CDF Plot?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-exact-cumulative-Prob-at-specified-value-in-CDF-Plot/m-p/777203#M95846</link>
      <description>&lt;P&gt;You can also script it and get an approximate value&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");

dist = dt &amp;lt;&amp;lt; Distribution(Column(:NPN1), CDF Plot(1));
fb = Report(dist)["CDF Plot",FrameBox(1)];

ls = fb &amp;lt;&amp;lt; Find Seg(LinesSeg(1));

m = ls &amp;lt;&amp;lt; get lines;

xval = 115;

idx = Loc Min(m[0, 1] - xval &amp;lt; 0) - 1;
val = m[idx, 2];

show(val);

// Report(dist)["CDF Plot",AxisBox(1)] &amp;lt;&amp;lt; Add Ref Line(val);
// Report(dist)["CDF Plot",AxisBox(2)] &amp;lt;&amp;lt; Add Ref Line(xval);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You might want to refine the logic how the specific value is calculated from the m matrix&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2024 11:49:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-exact-cumulative-Prob-at-specified-value-in-CDF-Plot/m-p/777203#M95846</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-07-29T11:49:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to get exact cumulative Prob at specified value in CDF Plot?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-exact-cumulative-Prob-at-specified-value-in-CDF-Plot/m-p/777208#M95851</link>
      <description>&lt;P&gt;wow, that's powerful!&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2024 14:10:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-exact-cumulative-Prob-at-specified-value-in-CDF-Plot/m-p/777208#M95851</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-07-29T14:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to get exact cumulative Prob at specified value in CDF Plot?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-exact-cumulative-Prob-at-specified-value-in-CDF-Plot/m-p/777449#M95886</link>
      <description>&lt;P&gt;This goes much off the topic but I tried to do something similar for Graph Builder which uses LineSeg instead of LinesSeg. Due to the smoothing it gets much more difficult and it is time for me to give up (at least for now). Attached is the script and I left some of my "working notes" as commented out code and the code isn't optimized at all.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_1-1722354318500.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/66611i1CE2E3D391647709/image-size/large?v=v2&amp;amp;px=999" role="button" title="jthi_1-1722354318500.png" alt="jthi_1-1722354318500.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-SPOILER&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;/*""" Attempt to get y-value from Graph Builder LineSeg

Author: jthi
Creation Date: 2024-07-30
Creation JMP Version: JMP Pro 18.0.0

Description: 
	Original post which gave me this idea (LinesSeg)
	https://community.jmp.com/t5/Discussions/How-to-get-exact-cumulative-Prob-at-specified-value-in-CDF-Plot/m-p/777203
	
"""*/

Names Default To Here(1);
// https://community.jmp.com/t5/JMPer-Cable/Understanding-cubic-splines/ba-p/39511 can be interesting read

dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");

slider_x = 200;

nw = New Window("Test",
	V List Box(align("center"),
		V List Box(
			Text Box("Adjust to change X"),
			Slider Box(110, 530, slider_x, nw &amp;lt;&amp;lt; update window, &amp;lt;&amp;lt; Set Width(1000));
		),
		Text Box("Change graph builder smoother settings to see changes to see different fits"),
		gb = dt &amp;lt;&amp;lt; Graph Builder(
			Size(1000, 600),
			Show Control Panel(1),
			Fit To Window("On"),
			Variables(X(:PNP1), Y(:NPN1)),
			Elements(Smoother(X, Y, Legend(4)))
		);
	);
);

fb = Report(gb)[FrameBox(1)];

/*
ls = fb &amp;lt;&amp;lt; Find Seg(LineSeg(1));
m_x = ls &amp;lt;&amp;lt; Get X Values;
m_y = ls &amp;lt;&amp;lt; Get Y Values;
smooth = ls &amp;lt;&amp;lt; Get Smoothness;

idx = Loc Sorted(m_x, Matrix(xval))[1];
// {Estimates, Std_Error, Diagnostics} = Linear Regression(m_y[idx::idx+1], m_x[idx::idx+1]);
// yval = Estimates[2] * xval + Estimates[1];
idx = Loc Sorted(m_x, Matrix(xval))[1];
yval = Interpolate(xval, m_x, m_y);
Report(gb)[AxisBox(1)] &amp;lt;&amp;lt; Add Ref Line(xval);
Report(gb)[AxisBox(2)] &amp;lt;&amp;lt; Add Ref Line(yval);
*/


/*
m_x[2::N Rows(m_x)::2] - m_x[1::N Rows(m_x) - 1::2]
m_y[2::N Rows(m_y)::2] - m_y[1::N Rows(m_y) - 1::2]
sl = Spline Smooth(m_x, m_y, smooth);
*/


Report(gb)[FrameBox(1)] &amp;lt;&amp;lt; Add Graphics Script(
	ls = fb &amp;lt;&amp;lt; Find Seg(LineSeg(1));
	m_x = ls &amp;lt;&amp;lt; Get X Values;
	m_y = ls &amp;lt;&amp;lt; Get Y Values;
	Marker(Marker State(3), m_x, m_y);
	Pen Size(1);
	Line(m_x, m_y);
	
	yval = Interpolate(slider_x, m_x, m_y);
	
	Marker Size(5);
	Marker(Marker State(12), {slider_x, yval});
	V Line(slider_x);
	H Line(yval);
	
	Text(Right Justified, Eval List({slider_x, yval + 1}), Eval Insert("(^Round(slider_x, 3)^, ^Round(yval, 3)^)"));
	
	peaks = m_y[1::N Rows(m_y) - 2] &amp;lt; m_y[2::N Rows(m_y) - 1] &amp;amp; m_y[2::N Rows(m_y) - 1] &amp;gt; m_y[3::N Rows(m_y)] |
	m_y[1::N Rows(m_y) - 2] &amp;gt; m_y[2::N Rows(m_y) - 1] &amp;amp; m_y[2::N Rows(m_y) - 1] &amp;lt; m_y[3::N Rows(m_y)];
	peak_idx = Loc(peaks) + 1;
	Marker Size(3);
	Fill Color("Red");
	Marker(Combine States(Color State("Red"), Marker State(15)), m_x[peak_idx], m_y[peak_idx]);
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI-SPOILER&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2024 15:46:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-exact-cumulative-Prob-at-specified-value-in-CDF-Plot/m-p/777449#M95886</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-07-30T15:46:15Z</dc:date>
    </item>
  </channel>
</rss>

