<?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: Percentiles in JMP different from other programs, how to get the same in JMP? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Percentiles-in-JMP-different-from-other-programs-how-to-get-the/m-p/848395#M102380</link>
    <description>&lt;P&gt;Thanks that worked.&amp;nbsp; Wasn't familiar with that command.&lt;/P&gt;</description>
    <pubDate>Tue, 18 Mar 2025 19:59:20 GMT</pubDate>
    <dc:creator>pmroz</dc:creator>
    <dc:date>2025-03-18T19:59:20Z</dc:date>
    <item>
      <title>Percentiles in JMP different from other programs, how to get the same in JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/Percentiles-in-JMP-different-from-other-programs-how-to-get-the/m-p/848309#M102362</link>
      <description>&lt;P&gt;Dear community,&lt;/P&gt;&lt;P&gt;we found that JMP calculates the percentiles differently from other programs, how can I get the same value in JMP?&lt;/P&gt;&lt;P&gt;Other programs are e.g. Oracle SQL and Excel (PERCENTILE.INC)&lt;/P&gt;&lt;P&gt;See some references and example in script below.&lt;/P&gt;&lt;P&gt;Thanks and BR&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);

// JMP calculates other Quantiles than Python/Excel
// how to get same values in JMP?

// see:
// web("https://community.jmp.com/t5/Discussions/Quantiles-result-from-JMP-are-different-from-Python/m-p/762983");
// perhaps JMP equal to PERCENTILE.EXC in Excel, and not to PERCENTILE.INC

// Percentile Calculation
// web("https://community.jmp.com/t5/Discussions/Quantile-Percentile-Calculation/m-p/327198");

data = [10.56 10.85 11.08 11.57 11.81 12.27 12.76];

Q80_oracle = 12.178;
// as excel as well

Q80_jmp = Quantile( 0.8, data );
// 12.466

// how can I get same values as in other programs?&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Mar 2025 13:42:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Percentiles-in-JMP-different-from-other-programs-how-to-get-the/m-p/848309#M102362</guid>
      <dc:creator>Georg</dc:creator>
      <dc:date>2025-03-18T13:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: Percentiles in JMP different from other programs, how to get the same in JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/Percentiles-in-JMP-different-from-other-programs-how-to-get-the/m-p/848380#M102370</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I just tested your dataset in Excel, and I got a Q80 value in Excel = 12.466, exactly the same as JMP.&lt;/P&gt;
&lt;P&gt;I cannot test in Oracle, but I noticed that in R, I get a Q80 value = 12.178. Moreover, the Q90 in R is 12.466.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There must be an explanation on how the quantiles are calculated between these programs.&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;TS&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Mar 2025 16:25:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Percentiles-in-JMP-different-from-other-programs-how-to-get-the/m-p/848380#M102370</guid>
      <dc:creator>Thierry_S</dc:creator>
      <dc:date>2025-03-18T16:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: Percentiles in JMP different from other programs, how to get the same in JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/Percentiles-in-JMP-different-from-other-programs-how-to-get-the/m-p/848383#M102371</link>
      <description>&lt;P&gt;One more thing:&lt;/P&gt;
&lt;P&gt;In R, there are 9 different ways to calculate quantiles.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Method 6 returns the same Q80 as JMP and Excel&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Thierry_S_0-1742315377461.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/73985iBFDAF2DF8D59E2D4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Thierry_S_0-1742315377461.png" alt="Thierry_S_0-1742315377461.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Method 7 returns the Q80 you found in Oracle:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Thierry_S_1-1742315484156.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/73986i52628637EDAE1F93/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Thierry_S_1-1742315484156.png" alt="Thierry_S_1-1742315484156.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;TS&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Mar 2025 16:31:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Percentiles-in-JMP-different-from-other-programs-how-to-get-the/m-p/848383#M102371</guid>
      <dc:creator>Thierry_S</dc:creator>
      <dc:date>2025-03-18T16:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: Percentiles in JMP different from other programs, how to get the same in JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/Percentiles-in-JMP-different-from-other-programs-how-to-get-the/m-p/848385#M102373</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/9474"&gt;@Georg&lt;/a&gt;&amp;nbsp;: I'm curious; do you mind if I ask why it matters if they match or not?&lt;/P&gt;</description>
      <pubDate>Tue, 18 Mar 2025 16:42:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Percentiles-in-JMP-different-from-other-programs-how-to-get-the/m-p/848385#M102373</guid>
      <dc:creator>MRB3855</dc:creator>
      <dc:date>2025-03-18T16:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: Percentiles in JMP different from other programs, how to get the same in JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/Percentiles-in-JMP-different-from-other-programs-how-to-get-the/m-p/848389#M102376</link>
      <description>&lt;P&gt;Dear all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for the input. The reason why we need is "customer expectation", i.e. the addressee expects a certain way to calculate.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Meanwhile I found a way with a python workaround, see script below.&lt;/P&gt;&lt;P&gt;Thanks to all and best regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;New Table( "Percentile_Cont_Example",
	Add Rows( 7 ),
	Compress File When Saved( 1 ),
	New Table Variable( "SQL",
		"with val_tab as
( 
select 1 AS lot, 11.08 as value FROM dual
union  select 1 AS lot, 12.76  as value FROM dual
union  select  1 AS lot,10.85 as value FROM dual
union  select 1 AS lot, 11.57 as value FROM dual
union   SELECT 1 AS lot, 10.56 as value FROM dual
union select 1 AS lot,  12.27 as value FROM dual
union  select 1 AS lot,11.81 as value FROM dual
)
SELECT
val_tab.lot
, val_tab.value
, percentile_cont(0.8) WITHIN GROUP (ORDER BY val_tab.value) OVER (PARTITION BY val_tab.lot) quant80_database
from 
val_tab"
	),
	New Column( "LOT",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [1, 1, 1, 1, 1, 1, 1] ),
		Set Display Width( 60 )
	),
	New Column( "VALUE",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [10.56, 10.85, 11.08, 11.57, 11.81, 12.27, 12.76] ),
		Set Display Width( 60 )
	),
	New Column( "QUANT80_DATABASE",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values(
			[12.178000000000001, 12.178000000000001, 12.178000000000001,
			12.178000000000001, 12.178000000000001, 12.178000000000001,
			12.178000000000001]
		),
		Set Display Width( 334 )
	),
	New Column( "Quantile80_JMP",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Formula( Col Quantile( :VALUE, 0.80000000000000004 ) ),
		Set Display Width( 141 )
	),
	New Column( "Quantile80_Python",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Formula(
			data = (As Column( :VALUE ) &amp;lt;&amp;lt; get values)[
			Loc( As Column( :LOT ) &amp;lt;&amp;lt; get values, :LOT )];
			Python Execute(
				{data},
				{result},
				"import numpy as np
result = np.quantile(data, 0.8)
"
			);
			result;
		),
		Set Selected,
		Set Display Width( 292 )
	)
)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Mar 2025 17:02:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Percentiles-in-JMP-different-from-other-programs-how-to-get-the/m-p/848389#M102376</guid>
      <dc:creator>Georg</dc:creator>
      <dc:date>2025-03-18T17:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: Percentiles in JMP different from other programs, how to get the same in JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/Percentiles-in-JMP-different-from-other-programs-how-to-get-the/m-p/848391#M102377</link>
      <description>&lt;P&gt;How do I install numpy for JMP 18?&amp;nbsp; I have a separate installation of python 3.13.2.&amp;nbsp; I installed numpy for that version but still get this error when trying to run the above code&lt;/P&gt;
&lt;PRE&gt;ModuleNotFoundError: Please install the Python package NumPy.
 at row 7&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Mar 2025 19:01:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Percentiles-in-JMP-different-from-other-programs-how-to-get-the/m-p/848391#M102377</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2025-03-18T19:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: Percentiles in JMP different from other programs, how to get the same in JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/Percentiles-in-JMP-different-from-other-programs-how-to-get-the/m-p/848393#M102378</link>
      <description>&lt;P&gt;Python Install Packages example from scripting index should work&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
// install numpy and pandas packages
Python Install Packages("numpy pandas");
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;or you can use python side of JMP and use jpip &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;import jmp

import jmputils
# update to latest version of pip and setuptools then install numpy &amp;amp; pandas
jmputils.jpip('install --upgrade', 'pip setuptools')
jmputils.jpip('install', 'numpy pandas')
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;A href="https://www.jmp.com/support/help/en/18.0/#page/jmp/install-a-python-package.shtml#" target="_blank"&gt;https://www.jmp.com/support/help/en/18.0/#page/jmp/install-a-python-package.shtml#&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Mar 2025 19:47:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Percentiles-in-JMP-different-from-other-programs-how-to-get-the/m-p/848393#M102378</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-03-18T19:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: Percentiles in JMP different from other programs, how to get the same in JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/Percentiles-in-JMP-different-from-other-programs-how-to-get-the/m-p/848394#M102379</link>
      <description>&lt;P&gt;Did you try&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Python Install Packages( "numpy" );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Mar 2025 19:49:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Percentiles-in-JMP-different-from-other-programs-how-to-get-the/m-p/848394#M102379</guid>
      <dc:creator>mmarchandFSLR</dc:creator>
      <dc:date>2025-03-18T19:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: Percentiles in JMP different from other programs, how to get the same in JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/Percentiles-in-JMP-different-from-other-programs-how-to-get-the/m-p/848395#M102380</link>
      <description>&lt;P&gt;Thanks that worked.&amp;nbsp; Wasn't familiar with that command.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Mar 2025 19:59:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Percentiles-in-JMP-different-from-other-programs-how-to-get-the/m-p/848395#M102380</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2025-03-18T19:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: Percentiles in JMP different from other programs, how to get the same in JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/Percentiles-in-JMP-different-from-other-programs-how-to-get-the/m-p/848476#M102387</link>
      <description>&lt;P&gt;In Excel there are two ways,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;PERCENTILE.INC and PERCENTILE.EXC.&lt;BR /&gt;My problem was, that I couldn't get the same value in JMP as customer with PERCENTILE.INC, so that workaround with python was needed.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Mar 2025 07:36:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Percentiles-in-JMP-different-from-other-programs-how-to-get-the/m-p/848476#M102387</guid>
      <dc:creator>Georg</dc:creator>
      <dc:date>2025-03-19T07:36:53Z</dc:date>
    </item>
  </channel>
</rss>

