<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Probability function names</title>
	<atom:link href="http://www.johndcook.com/blog/2012/07/02/probability-function-names/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.johndcook.com/blog/2012/07/02/probability-function-names/</link>
	<description>John D. Cook</description>
	<lastBuildDate>Thu, 23 May 2013 10:27:37 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: John</title>
		<link>http://www.johndcook.com/blog/2012/07/02/probability-function-names/comment-page-1/#comment-1827</link>
		<dc:creator>John</dc:creator>
		<pubDate>Wed, 04 Jul 2012 05:10:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=11625#comment-1827</guid>
		<description><![CDATA[Tom: I&#039;ve written a class library in C++ and one in C#. Both use distribution objects with member functions for CDF etc. For example, the &lt;code&gt;NormalDistribution&lt;/code&gt; class has methods &lt;code&gt;PDF&lt;/code&gt;, &lt;code&gt;LogPDF&lt;/code&gt;, &lt;code&gt;CDF&lt;/code&gt;, &lt;code&gt;CDFInverse&lt;/code&gt;, &lt;code&gt;CCDF&lt;/code&gt;, &lt;code&gt;CCDFInverse&lt;/code&gt;, &lt;code&gt;Mean&lt;/code&gt;, &lt;code&gt;Variance&lt;/code&gt;, &lt;code&gt;RandomValue&lt;/code&gt;, etc.

One advantage to this approach is that you can write generic code that takes a distribution class. For example, a unit test might integrate the PDF function and compare the result to the CDF function. If all the distribution classes have a common base class or implement a common abstract interface, you could write this test once and pass it objects representing several different distribution families.]]></description>
		<content:encoded><![CDATA[<p>Tom: I&#8217;ve written a class library in C++ and one in C#. Both use distribution objects with member functions for CDF etc. For example, the <code>NormalDistribution</code> class has methods <code>PDF</code>, <code>LogPDF</code>, <code>CDF</code>, <code>CDFInverse</code>, <code>CCDF</code>, <code>CCDFInverse</code>, <code>Mean</code>, <code>Variance</code>, <code>RandomValue</code>, etc.</p>
<p>One advantage to this approach is that you can write generic code that takes a distribution class. For example, a unit test might integrate the PDF function and compare the result to the CDF function. If all the distribution classes have a common base class or implement a common abstract interface, you could write this test once and pass it objects representing several different distribution families.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Nish</title>
		<link>http://www.johndcook.com/blog/2012/07/02/probability-function-names/comment-page-1/#comment-1826</link>
		<dc:creator>Tom Nish</dc:creator>
		<pubDate>Wed, 04 Jul 2012 00:51:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=11625#comment-1826</guid>
		<description><![CDATA[Dr. Cook,
How would you name probability function if you were writing such a library from scratch?  I ask b/c I&#039;m doing something similar for Perl, built upon GSL&#039;s randist functions.  GSL names their sampler, pdf, cdf, ccdf and quantile functions gsl_ran_gaussian, gsl_ran_gaussian_pdf and gsl_ran_gaussian_cdf_P, gsl_ran_gaussian_cdf_Q, gsl_ran_gaussian_cdf_Pinv, and gsl_ran_gaussian_cdf_Qinv, which is quite verbose though consistent.

Right now, I&#039;m thinking of including a straight GSL-binding, but also provide alternative interfaces mimicking other langauges (like R and octave/matlab, by wrapping gsl_ran_gaussian into rnorm for R and normrnd for octave).
-Tom]]></description>
		<content:encoded><![CDATA[<p>Dr. Cook,<br />
How would you name probability function if you were writing such a library from scratch?  I ask b/c I&#8217;m doing something similar for Perl, built upon GSL&#8217;s randist functions.  GSL names their sampler, pdf, cdf, ccdf and quantile functions gsl_ran_gaussian, gsl_ran_gaussian_pdf and gsl_ran_gaussian_cdf_P, gsl_ran_gaussian_cdf_Q, gsl_ran_gaussian_cdf_Pinv, and gsl_ran_gaussian_cdf_Qinv, which is quite verbose though consistent.</p>
<p>Right now, I&#8217;m thinking of including a straight GSL-binding, but also provide alternative interfaces mimicking other langauges (like R and octave/matlab, by wrapping gsl_ran_gaussian into rnorm for R and normrnd for octave).<br />
-Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rick Wicklin</title>
		<link>http://www.johndcook.com/blog/2012/07/02/probability-function-names/comment-page-1/#comment-1825</link>
		<dc:creator>Rick Wicklin</dc:creator>
		<pubDate>Tue, 03 Jul 2012 14:19:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=11625#comment-1825</guid>
		<description><![CDATA[In SAS the names are CDF and SDF. Therea re also separate LOGCDF and LOGSDF functions, which are sometimes more efficient or accurate than computing the distribution and than taking the logarithm. The other esential functions for dealing with distributions are PDF, QUANTILE, and RAND. For details and a discussion that compares these naming scheme with other languages, see &lt;a href=&quot;http://blogs.sas.com/content/iml/2011/10/19/four-essential-functions-for-statistical-programmers/&quot; rel=&quot;nofollow&quot;&gt;&quot;Four essential functions for statistical programmers&quot;&lt;/a&gt;]]></description>
		<content:encoded><![CDATA[<p>In SAS the names are CDF and SDF. Therea re also separate LOGCDF and LOGSDF functions, which are sometimes more efficient or accurate than computing the distribution and than taking the logarithm. The other esential functions for dealing with distributions are PDF, QUANTILE, and RAND. For details and a discussion that compares these naming scheme with other languages, see <a href="http://blogs.sas.com/content/iml/2011/10/19/four-essential-functions-for-statistical-programmers/" rel="nofollow">&#8220;Four essential functions for statistical programmers&#8221;</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Benoit Hamelin</title>
		<link>http://www.johndcook.com/blog/2012/07/02/probability-function-names/comment-page-1/#comment-1824</link>
		<dc:creator>Benoit Hamelin</dc:creator>
		<pubDate>Tue, 03 Jul 2012 12:21:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=11625#comment-1824</guid>
		<description><![CDATA[Matlab uses a scheme similar to R, where probability functions go &lt;code&gt;{family}{function type}&lt;/code&gt;. So, one has &lt;code&gt;normcdf&lt;/code&gt; for the CDF of the normal function, and &lt;code&gt;tcdf&lt;/code&gt; for that of the Student &lt;em&gt;t&lt;/em&gt; distribution, and so on. Surprisingly, a quick look through the documentation of the probability toolbox could not unearth any obvious equivalent for the CCDF, which seems like an unfortunate omission. It does have, however, inverse-CDF functions, such as &lt;code&gt;norminv&lt;/code&gt; and &lt;code&gt;tinv&lt;/code&gt;: useful for statistical estimation and hypothesis testing, but confusing when looking for CCDFs. :-)]]></description>
		<content:encoded><![CDATA[<p>Matlab uses a scheme similar to R, where probability functions go <code>{family}{function type}</code>. So, one has <code>normcdf</code> for the CDF of the normal function, and <code>tcdf</code> for that of the Student <em>t</em> distribution, and so on. Surprisingly, a quick look through the documentation of the probability toolbox could not unearth any obvious equivalent for the CCDF, which seems like an unfortunate omission. It does have, however, inverse-CDF functions, such as <code>norminv</code> and <code>tinv</code>: useful for statistical estimation and hypothesis testing, but confusing when looking for CCDFs. <img src='http://www.johndcook.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
