<html lang="en"> <head> <title>Distributions - GNU Octave</title> <meta http-equiv="Content-Type" content="text/html"> <meta name="description" content="GNU Octave"> <meta name="generator" content="makeinfo 4.13"> <link title="Top" rel="start" href="index.html#Top"> <link rel="up" href="Statistics.html#Statistics" title="Statistics"> <link rel="prev" href="Correlation-and-Regression-Analysis.html#Correlation-and-Regression-Analysis" title="Correlation and Regression Analysis"> <link rel="next" href="Tests.html#Tests" title="Tests"> <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> <meta http-equiv="Content-Style-Type" content="text/css"> <style type="text/css"><!-- pre.display { font-family:inherit } pre.format { font-family:inherit } pre.smalldisplay { font-family:inherit; font-size:smaller } pre.smallformat { font-family:inherit; font-size:smaller } pre.smallexample { font-size:smaller } pre.smalllisp { font-size:smaller } span.sc { font-variant:small-caps } span.roman { font-family:serif; font-weight:normal; } span.sansserif { font-family:sans-serif; font-weight:normal; } --></style> </head> <body> <div class="node"> <a name="Distributions"></a> <p> Next: <a rel="next" accesskey="n" href="Tests.html#Tests">Tests</a>, Previous: <a rel="previous" accesskey="p" href="Correlation-and-Regression-Analysis.html#Correlation-and-Regression-Analysis">Correlation and Regression Analysis</a>, Up: <a rel="up" accesskey="u" href="Statistics.html#Statistics">Statistics</a> <hr> </div> <h3 class="section">26.5 Distributions</h3> <p>Octave has functions for computing the Probability Density Function (PDF), the Cumulative Distribution function (CDF), and the quantile (the inverse of the CDF) for a large number of distributions. <p>The following table summarizes the supported distributions (in alphabetical order). <p><table summary=""><tr align="left"><th valign="top" width="31%">Distribution </th><th valign="top" width="23%">PDF </th><th valign="top" width="23%">CDF </th><th valign="top" width="23%">Quantile <br></th></tr><tr align="left"><td valign="top" width="31%">Beta Distribution </td><td valign="top" width="23%"><code>betapdf</code> </td><td valign="top" width="23%"><code>betacdf</code> </td><td valign="top" width="23%"><code>betainv</code> <br></td></tr><tr align="left"><td valign="top" width="31%">Binomial Distribution </td><td valign="top" width="23%"><code>binopdf</code> </td><td valign="top" width="23%"><code>binocdf</code> </td><td valign="top" width="23%"><code>binoinv</code> <br></td></tr><tr align="left"><td valign="top" width="31%">Cauchy Distribution </td><td valign="top" width="23%"><code>cauchy_pdf</code> </td><td valign="top" width="23%"><code>cauchy_cdf</code> </td><td valign="top" width="23%"><code>cauchy_inv</code> <br></td></tr><tr align="left"><td valign="top" width="31%">Chi-Square Distribution </td><td valign="top" width="23%"><code>chi2pdf</code> </td><td valign="top" width="23%"><code>chi2cdf</code> </td><td valign="top" width="23%"><code>chi2inv</code> <br></td></tr><tr align="left"><td valign="top" width="31%">Univariate Discrete Distribution </td><td valign="top" width="23%"><code>discrete_pdf</code> </td><td valign="top" width="23%"><code>discrete_cdf</code> </td><td valign="top" width="23%"><code>discrete_inv</code> <br></td></tr><tr align="left"><td valign="top" width="31%">Empirical Distribution </td><td valign="top" width="23%"><code>empirical_pdf</code> </td><td valign="top" width="23%"><code>empirical_cdf</code> </td><td valign="top" width="23%"><code>empirical_inv</code> <br></td></tr><tr align="left"><td valign="top" width="31%">Exponential Distribution </td><td valign="top" width="23%"><code>exppdf</code> </td><td valign="top" width="23%"><code>expcdf</code> </td><td valign="top" width="23%"><code>expinv</code> <br></td></tr><tr align="left"><td valign="top" width="31%">F Distribution </td><td valign="top" width="23%"><code>fpdf</code> </td><td valign="top" width="23%"><code>fcdf</code> </td><td valign="top" width="23%"><code>finv</code> <br></td></tr><tr align="left"><td valign="top" width="31%">Gamma Distribution </td><td valign="top" width="23%"><code>gampdf</code> </td><td valign="top" width="23%"><code>gamcdf</code> </td><td valign="top" width="23%"><code>gaminv</code> <br></td></tr><tr align="left"><td valign="top" width="31%">Geometric Distribution </td><td valign="top" width="23%"><code>geopdf</code> </td><td valign="top" width="23%"><code>geocdf</code> </td><td valign="top" width="23%"><code>geoinv</code> <br></td></tr><tr align="left"><td valign="top" width="31%">Hypergeometric Distribution </td><td valign="top" width="23%"><code>hygepdf</code> </td><td valign="top" width="23%"><code>hygecdf</code> </td><td valign="top" width="23%"><code>hygeinv</code> <br></td></tr><tr align="left"><td valign="top" width="31%">Kolmogorov Smirnov Distribution </td><td valign="top" width="23%"><em>Not Available</em> </td><td valign="top" width="23%"><code>kolmogorov_smirnov_cdf</code> </td><td valign="top" width="23%"><em>Not Available</em> <br></td></tr><tr align="left"><td valign="top" width="31%">Laplace Distribution </td><td valign="top" width="23%"><code>laplace_pdf</code> </td><td valign="top" width="23%"><code>laplace_cdf</code> </td><td valign="top" width="23%"><code>laplace_inv</code> <br></td></tr><tr align="left"><td valign="top" width="31%">Logistic Distribution </td><td valign="top" width="23%"><code>logistic_pdf</code> </td><td valign="top" width="23%"><code>logistic_cdf</code> </td><td valign="top" width="23%"><code>logistic_inv</code> <br></td></tr><tr align="left"><td valign="top" width="31%">Log-Normal Distribution </td><td valign="top" width="23%"><code>lognpdf</code> </td><td valign="top" width="23%"><code>logncdf</code> </td><td valign="top" width="23%"><code>logninv</code> <br></td></tr><tr align="left"><td valign="top" width="31%">Univariate Normal Distribution </td><td valign="top" width="23%"><code>normpdf</code> </td><td valign="top" width="23%"><code>normcdf</code> </td><td valign="top" width="23%"><code>norminv</code> <br></td></tr><tr align="left"><td valign="top" width="31%">Pascal Distribution </td><td valign="top" width="23%"><code>nbinpdf</code> </td><td valign="top" width="23%"><code>nbincdf</code> </td><td valign="top" width="23%"><code>nbininv</code> <br></td></tr><tr align="left"><td valign="top" width="31%">Poisson Distribution </td><td valign="top" width="23%"><code>poisspdf</code> </td><td valign="top" width="23%"><code>poisscdf</code> </td><td valign="top" width="23%"><code>poissinv</code> <br></td></tr><tr align="left"><td valign="top" width="31%">Standard Normal Distribution </td><td valign="top" width="23%"><code>stdnormal_pdf</code> </td><td valign="top" width="23%"><code>stdnormal_cdf</code> </td><td valign="top" width="23%"><code>stdnormal_inv</code> <br></td></tr><tr align="left"><td valign="top" width="31%">t (Student) Distribution </td><td valign="top" width="23%"><code>tpdf</code> </td><td valign="top" width="23%"><code>tcdf</code> </td><td valign="top" width="23%"><code>tinv</code> <br></td></tr><tr align="left"><td valign="top" width="31%">Univariate Discrete Distribution </td><td valign="top" width="23%"><code>unidpdf</code> </td><td valign="top" width="23%"><code>unidcdf</code> </td><td valign="top" width="23%"><code>unidinv</code> <br></td></tr><tr align="left"><td valign="top" width="31%">Uniform Distribution </td><td valign="top" width="23%"><code>unifpdf</code> </td><td valign="top" width="23%"><code>unifcdf</code> </td><td valign="top" width="23%"><code>unifinv</code> <br></td></tr><tr align="left"><td valign="top" width="31%">Weibull Distribution </td><td valign="top" width="23%"><code>wblpdf</code> </td><td valign="top" width="23%"><code>wblcdf</code> </td><td valign="top" width="23%"><code>wblinv</code> <br></td></tr></table> <!-- betapdf scripts/statistics/distributions/betapdf.m --> <p><a name="doc_002dbetapdf"></a> <div class="defun"> — Function File: <b>betapdf</b> (<var>x, a, b</var>)<var><a name="index-betapdf-2483"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the probability density function (PDF) at <var>x</var> of the Beta distribution with parameters <var>a</var> and <var>b</var>. </p></blockquote></div> <!-- betacdf scripts/statistics/distributions/betacdf.m --> <p><a name="doc_002dbetacdf"></a> <div class="defun"> — Function File: <b>betacdf</b> (<var>x, a, b</var>)<var><a name="index-betacdf-2484"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the cumulative distribution function (CDF) at <var>x</var> of the Beta distribution with parameters <var>a</var> and <var>b</var>. </p></blockquote></div> <!-- betainv scripts/statistics/distributions/betainv.m --> <p><a name="doc_002dbetainv"></a> <div class="defun"> — Function File: <b>betainv</b> (<var>x, a, b</var>)<var><a name="index-betainv-2485"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the quantile (the inverse of the CDF) at <var>x</var> of the Beta distribution with parameters <var>a</var> and <var>b</var>. </p></blockquote></div> <!-- binopdf scripts/statistics/distributions/binopdf.m --> <p><a name="doc_002dbinopdf"></a> <div class="defun"> — Function File: <b>binopdf</b> (<var>x, n, p</var>)<var><a name="index-binopdf-2486"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the probability density function (PDF) at <var>x</var> of the binomial distribution with parameters <var>n</var> and <var>p</var>, where <var>n</var> is the number of trials and <var>p</var> is the probability of success. </p></blockquote></div> <!-- binocdf scripts/statistics/distributions/binocdf.m --> <p><a name="doc_002dbinocdf"></a> <div class="defun"> — Function File: <b>binocdf</b> (<var>x, n, p</var>)<var><a name="index-binocdf-2487"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the cumulative distribution function (CDF) at <var>x</var> of the binomial distribution with parameters <var>n</var> and <var>p</var>, where <var>n</var> is the number of trials and <var>p</var> is the probability of success. </p></blockquote></div> <!-- binoinv scripts/statistics/distributions/binoinv.m --> <p><a name="doc_002dbinoinv"></a> <div class="defun"> — Function File: <b>binoinv</b> (<var>x, n, p</var>)<var><a name="index-binoinv-2488"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the quantile (the inverse of the CDF) at <var>x</var> of the binomial distribution with parameters <var>n</var> and <var>p</var>, where <var>n</var> is the number of trials and <var>p</var> is the probability of success. </p></blockquote></div> <!-- cauchy_pdf scripts/statistics/distributions/cauchy_pdf.m --> <p><a name="doc_002dcauchy_005fpdf"></a> <div class="defun"> — Function File: <b>cauchy_pdf</b> (<var>x</var>)<var><a name="index-cauchy_005fpdf-2489"></a></var><br> — Function File: <b>cauchy_pdf</b> (<var>x, location, scale</var>)<var><a name="index-cauchy_005fpdf-2490"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the probability density function (PDF) at <var>x</var> of the Cauchy distribution with location parameter <var>location</var> and scale parameter <var>scale</var> > 0. Default values are <var>location</var> = 0, <var>scale</var> = 1. </p></blockquote></div> <!-- cauchy_cdf scripts/statistics/distributions/cauchy_cdf.m --> <p><a name="doc_002dcauchy_005fcdf"></a> <div class="defun"> — Function File: <b>cauchy_cdf</b> (<var>x</var>)<var><a name="index-cauchy_005fcdf-2491"></a></var><br> — Function File: <b>cauchy_cdf</b> (<var>x, location, scale</var>)<var><a name="index-cauchy_005fcdf-2492"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the cumulative distribution function (CDF) at <var>x</var> of the Cauchy distribution with location parameter <var>location</var> and scale parameter <var>scale</var>. Default values are <var>location</var> = 0, <var>scale</var> = 1. </p></blockquote></div> <!-- cauchy_inv scripts/statistics/distributions/cauchy_inv.m --> <p><a name="doc_002dcauchy_005finv"></a> <div class="defun"> — Function File: <b>cauchy_inv</b> (<var>x</var>)<var><a name="index-cauchy_005finv-2493"></a></var><br> — Function File: <b>cauchy_inv</b> (<var>x, location, scale</var>)<var><a name="index-cauchy_005finv-2494"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the quantile (the inverse of the CDF) at <var>x</var> of the Cauchy distribution with location parameter <var>location</var> and scale parameter <var>scale</var>. Default values are <var>location</var> = 0, <var>scale</var> = 1. </p></blockquote></div> <!-- chi2pdf scripts/statistics/distributions/chi2pdf.m --> <p><a name="doc_002dchi2pdf"></a> <div class="defun"> — Function File: <b>chi2pdf</b> (<var>x, n</var>)<var><a name="index-chi2pdf-2495"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the probability density function (PDF) at <var>x</var> of the chi-square distribution with <var>n</var> degrees of freedom. </p></blockquote></div> <!-- chi2cdf scripts/statistics/distributions/chi2cdf.m --> <p><a name="doc_002dchi2cdf"></a> <div class="defun"> — Function File: <b>chi2cdf</b> (<var>x, n</var>)<var><a name="index-chi2cdf-2496"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the cumulative distribution function (CDF) at <var>x</var> of the chi-square distribution with <var>n</var> degrees of freedom. </p></blockquote></div> <!-- chi2inv scripts/statistics/distributions/chi2inv.m --> <p><a name="doc_002dchi2inv"></a> <div class="defun"> — Function File: <b>chi2inv</b> (<var>x, n</var>)<var><a name="index-chi2inv-2497"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the quantile (the inverse of the CDF) at <var>x</var> of the chi-square distribution with <var>n</var> degrees of freedom. </p></blockquote></div> <!-- discrete_pdf scripts/statistics/distributions/discrete_pdf.m --> <p><a name="doc_002ddiscrete_005fpdf"></a> <div class="defun"> — Function File: <b>discrete_pdf</b> (<var>x, v, p</var>)<var><a name="index-discrete_005fpdf-2498"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the probability density function (PDF) at <var>x</var> of a univariate discrete distribution which assumes the values in <var>v</var> with probabilities <var>p</var>. </p></blockquote></div> <!-- discrete_cdf scripts/statistics/distributions/discrete_cdf.m --> <p><a name="doc_002ddiscrete_005fcdf"></a> <div class="defun"> — Function File: <b>discrete_cdf</b> (<var>x, v, p</var>)<var><a name="index-discrete_005fcdf-2499"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the cumulative distribution function (CDF) at <var>x</var> of a univariate discrete distribution which assumes the values in <var>v</var> with probabilities <var>p</var>. </p></blockquote></div> <!-- discrete_inv scripts/statistics/distributions/discrete_inv.m --> <p><a name="doc_002ddiscrete_005finv"></a> <div class="defun"> — Function File: <b>discrete_inv</b> (<var>x, v, p</var>)<var><a name="index-discrete_005finv-2500"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the quantile (the inverse of the CDF) at <var>x</var> of the univariate distribution which assumes the values in <var>v</var> with probabilities <var>p</var>. </p></blockquote></div> <!-- empirical_pdf scripts/statistics/distributions/empirical_pdf.m --> <p><a name="doc_002dempirical_005fpdf"></a> <div class="defun"> — Function File: <b>empirical_pdf</b> (<var>x, data</var>)<var><a name="index-empirical_005fpdf-2501"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the probability density function (PDF) at <var>x</var> of the empirical distribution obtained from the univariate sample <var>data</var>. </p></blockquote></div> <!-- empirical_cdf scripts/statistics/distributions/empirical_cdf.m --> <p><a name="doc_002dempirical_005fcdf"></a> <div class="defun"> — Function File: <b>empirical_cdf</b> (<var>x, data</var>)<var><a name="index-empirical_005fcdf-2502"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the cumulative distribution function (CDF) at <var>x</var> of the empirical distribution obtained from the univariate sample <var>data</var>. </p></blockquote></div> <!-- empirical_inv scripts/statistics/distributions/empirical_inv.m --> <p><a name="doc_002dempirical_005finv"></a> <div class="defun"> — Function File: <b>empirical_inv</b> (<var>x, data</var>)<var><a name="index-empirical_005finv-2503"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the quantile (the inverse of the CDF) at <var>x</var> of the empirical distribution obtained from the univariate sample <var>data</var>. </p></blockquote></div> <!-- exppdf scripts/statistics/distributions/exppdf.m --> <p><a name="doc_002dexppdf"></a> <div class="defun"> — Function File: <b>exppdf</b> (<var>x, lambda</var>)<var><a name="index-exppdf-2504"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the probability density function (PDF) at <var>x</var> of the exponential distribution with mean <var>lambda</var>. </p></blockquote></div> <!-- expcdf scripts/statistics/distributions/expcdf.m --> <p><a name="doc_002dexpcdf"></a> <div class="defun"> — Function File: <b>expcdf</b> (<var>x, lambda</var>)<var><a name="index-expcdf-2505"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the cumulative distribution function (CDF) at <var>x</var> of the exponential distribution with mean <var>lambda</var>. <p>The arguments can be of common size or scalars. </p></blockquote></div> <!-- expinv scripts/statistics/distributions/expinv.m --> <p><a name="doc_002dexpinv"></a> <div class="defun"> — Function File: <b>expinv</b> (<var>x, lambda</var>)<var><a name="index-expinv-2506"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the quantile (the inverse of the CDF) at <var>x</var> of the exponential distribution with mean <var>lambda</var>. </p></blockquote></div> <!-- fpdf scripts/statistics/distributions/fpdf.m --> <p><a name="doc_002dfpdf"></a> <div class="defun"> — Function File: <b>fpdf</b> (<var>x, m, n</var>)<var><a name="index-fpdf-2507"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the probability density function (PDF) at <var>x</var> of the F distribution with <var>m</var> and <var>n</var> degrees of freedom. </p></blockquote></div> <!-- fcdf scripts/statistics/distributions/fcdf.m --> <p><a name="doc_002dfcdf"></a> <div class="defun"> — Function File: <b>fcdf</b> (<var>x, m, n</var>)<var><a name="index-fcdf-2508"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the cumulative distribution function (CDF) at <var>x</var> of the F distribution with <var>m</var> and <var>n</var> degrees of freedom. </p></blockquote></div> <!-- finv scripts/statistics/distributions/finv.m --> <p><a name="doc_002dfinv"></a> <div class="defun"> — Function File: <b>finv</b> (<var>x, m, n</var>)<var><a name="index-finv-2509"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the quantile (the inverse of the CDF) at <var>x</var> of the F distribution with <var>m</var> and <var>n</var> degrees of freedom. </p></blockquote></div> <!-- gampdf scripts/statistics/distributions/gampdf.m --> <p><a name="doc_002dgampdf"></a> <div class="defun"> — Function File: <b>gampdf</b> (<var>x, a, b</var>)<var><a name="index-gampdf-2510"></a></var><br> <blockquote><p>For each element of <var>x</var>, return the probability density function (PDF) at <var>x</var> of the Gamma distribution with shape parameter <var>a</var> and scale <var>b</var>. </p></blockquote></div> <!-- gamcdf scripts/statistics/distributions/gamcdf.m --> <p><a name="doc_002dgamcdf"></a> <div class="defun"> — Function File: <b>gamcdf</b> (<var>x, a, b</var>)<var><a name="index-gamcdf-2511"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the cumulative distribution function (CDF) at <var>x</var> of the Gamma distribution with shape parameter <var>a</var> and scale <var>b</var>. </p></blockquote></div> <!-- gaminv scripts/statistics/distributions/gaminv.m --> <p><a name="doc_002dgaminv"></a> <div class="defun"> — Function File: <b>gaminv</b> (<var>x, a, b</var>)<var><a name="index-gaminv-2512"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the quantile (the inverse of the CDF) at <var>x</var> of the Gamma distribution with shape parameter <var>a</var> and scale <var>b</var>. </p></blockquote></div> <!-- geopdf scripts/statistics/distributions/geopdf.m --> <p><a name="doc_002dgeopdf"></a> <div class="defun"> — Function File: <b>geopdf</b> (<var>x, p</var>)<var><a name="index-geopdf-2513"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the probability density function (PDF) at <var>x</var> of the geometric distribution with parameter <var>p</var>. </p></blockquote></div> <!-- geocdf scripts/statistics/distributions/geocdf.m --> <p><a name="doc_002dgeocdf"></a> <div class="defun"> — Function File: <b>geocdf</b> (<var>x, p</var>)<var><a name="index-geocdf-2514"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the cumulative distribution function (CDF) at <var>x</var> of the geometric distribution with parameter <var>p</var>. </p></blockquote></div> <!-- geoinv scripts/statistics/distributions/geoinv.m --> <p><a name="doc_002dgeoinv"></a> <div class="defun"> — Function File: <b>geoinv</b> (<var>x, p</var>)<var><a name="index-geoinv-2515"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the quantile (the inverse of the CDF) at <var>x</var> of the geometric distribution with parameter <var>p</var>. </p></blockquote></div> <!-- hygepdf scripts/statistics/distributions/hygepdf.m --> <p><a name="doc_002dhygepdf"></a> <div class="defun"> — Function File: <b>hygepdf</b> (<var>x, t, m, n</var>)<var><a name="index-hygepdf-2516"></a></var><br> <blockquote><p>Compute the probability density function (PDF) at <var>x</var> of the hypergeometric distribution with parameters <var>t</var>, <var>m</var>, and <var>n</var>. This is the probability of obtaining <var>x</var> marked items when randomly drawing a sample of size <var>n</var> without replacement from a population of total size <var>t</var> containing <var>m</var> marked items. <p>The parameters <var>t</var>, <var>m</var>, and <var>n</var> must be positive integers with <var>m</var> and <var>n</var> not greater than <var>t</var>. </p></blockquote></div> <!-- hygecdf scripts/statistics/distributions/hygecdf.m --> <p><a name="doc_002dhygecdf"></a> <div class="defun"> — Function File: <b>hygecdf</b> (<var>x, t, m, n</var>)<var><a name="index-hygecdf-2517"></a></var><br> <blockquote><p>Compute the cumulative distribution function (CDF) at <var>x</var> of the hypergeometric distribution with parameters <var>t</var>, <var>m</var>, and <var>n</var>. This is the probability of obtaining not more than <var>x</var> marked items when randomly drawing a sample of size <var>n</var> without replacement from a population of total size <var>t</var> containing <var>m</var> marked items. <p>The parameters <var>t</var>, <var>m</var>, and <var>n</var> must be positive integers with <var>m</var> and <var>n</var> not greater than <var>t</var>. </p></blockquote></div> <!-- hygeinv scripts/statistics/distributions/hygeinv.m --> <p><a name="doc_002dhygeinv"></a> <div class="defun"> — Function File: <b>hygeinv</b> (<var>x, t, m, n</var>)<var><a name="index-hygeinv-2518"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the quantile (the inverse of the CDF) at <var>x</var> of the hypergeometric distribution with parameters <var>t</var>, <var>m</var>, and <var>n</var>. This is the probability of obtaining <var>x</var> marked items when randomly drawing a sample of size <var>n</var> without replacement from a population of total size <var>t</var> containing <var>m</var> marked items. <p>The parameters <var>t</var>, <var>m</var>, and <var>n</var> must be positive integers with <var>m</var> and <var>n</var> not greater than <var>t</var>. </p></blockquote></div> <!-- kolmogorov_smirnov_cdf scripts/statistics/distributions/kolmogorov_smirnov_cdf.m --> <p><a name="doc_002dkolmogorov_005fsmirnov_005fcdf"></a> <div class="defun"> — Function File: <b>kolmogorov_smirnov_cdf</b> (<var>x, tol</var>)<var><a name="index-kolmogorov_005fsmirnov_005fcdf-2519"></a></var><br> <blockquote><p>Return the cumulative distribution function (CDF) at <var>x</var> of the Kolmogorov-Smirnov distribution, <pre class="example"> Inf Q(x) = SUM (-1)^k exp (-2 k^2 x^2) k = -Inf </pre> <p class="noindent">for <var>x</var> > 0. <p>The optional parameter <var>tol</var> specifies the precision up to which the series should be evaluated; the default is <var>tol</var> = <code>eps</code>. </p></blockquote></div> <!-- laplace_pdf scripts/statistics/distributions/laplace_pdf.m --> <p><a name="doc_002dlaplace_005fpdf"></a> <div class="defun"> — Function File: <b>laplace_pdf</b> (<var>x</var>)<var><a name="index-laplace_005fpdf-2520"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the probability density function (PDF) at <var>x</var> of the Laplace distribution. </p></blockquote></div> <!-- laplace_cdf scripts/statistics/distributions/laplace_cdf.m --> <p><a name="doc_002dlaplace_005fcdf"></a> <div class="defun"> — Function File: <b>laplace_cdf</b> (<var>x</var>)<var><a name="index-laplace_005fcdf-2521"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the cumulative distribution function (CDF) at <var>x</var> of the Laplace distribution. </p></blockquote></div> <!-- laplace_inv scripts/statistics/distributions/laplace_inv.m --> <p><a name="doc_002dlaplace_005finv"></a> <div class="defun"> — Function File: <b>laplace_inv</b> (<var>x</var>)<var><a name="index-laplace_005finv-2522"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the quantile (the inverse of the CDF) at <var>x</var> of the Laplace distribution. </p></blockquote></div> <!-- logistic_pdf scripts/statistics/distributions/logistic_pdf.m --> <p><a name="doc_002dlogistic_005fpdf"></a> <div class="defun"> — Function File: <b>logistic_pdf</b> (<var>x</var>)<var><a name="index-logistic_005fpdf-2523"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the PDF at <var>x</var> of the logistic distribution. </p></blockquote></div> <!-- logistic_cdf scripts/statistics/distributions/logistic_cdf.m --> <p><a name="doc_002dlogistic_005fcdf"></a> <div class="defun"> — Function File: <b>logistic_cdf</b> (<var>x</var>)<var><a name="index-logistic_005fcdf-2524"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the cumulative distribution function (CDF) at <var>x</var> of the logistic distribution. </p></blockquote></div> <!-- logistic_inv scripts/statistics/distributions/logistic_inv.m --> <p><a name="doc_002dlogistic_005finv"></a> <div class="defun"> — Function File: <b>logistic_inv</b> (<var>x</var>)<var><a name="index-logistic_005finv-2525"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the quantile (the inverse of the CDF) at <var>x</var> of the logistic distribution. </p></blockquote></div> <!-- lognpdf scripts/statistics/distributions/lognpdf.m --> <p><a name="doc_002dlognpdf"></a> <div class="defun"> — Function File: <b>lognpdf</b> (<var>x</var>)<var><a name="index-lognpdf-2526"></a></var><br> — Function File: <b>lognpdf</b> (<var>x, mu, sigma</var>)<var><a name="index-lognpdf-2527"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the probability density function (PDF) at <var>x</var> of the lognormal distribution with parameters <var>mu</var> and <var>sigma</var>. If a random variable follows this distribution, its logarithm is normally distributed with mean <var>mu</var> and standard deviation <var>sigma</var>. <p>Default values are <var>mu</var> = 1, <var>sigma</var> = 1. </p></blockquote></div> <!-- logncdf scripts/statistics/distributions/logncdf.m --> <p><a name="doc_002dlogncdf"></a> <div class="defun"> — Function File: <b>logncdf</b> (<var>x</var>)<var><a name="index-logncdf-2528"></a></var><br> — Function File: <b>logncdf</b> (<var>x, mu, sigma</var>)<var><a name="index-logncdf-2529"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the cumulative distribution function (CDF) at <var>x</var> of the lognormal distribution with parameters <var>mu</var> and <var>sigma</var>. If a random variable follows this distribution, its logarithm is normally distributed with mean <var>mu</var> and standard deviation <var>sigma</var>. <p>Default values are <var>mu</var> = 1, <var>sigma</var> = 1. </p></blockquote></div> <!-- logninv scripts/statistics/distributions/logninv.m --> <p><a name="doc_002dlogninv"></a> <div class="defun"> — Function File: <b>logninv</b> (<var>x</var>)<var><a name="index-logninv-2530"></a></var><br> — Function File: <b>logninv</b> (<var>x, mu, sigma</var>)<var><a name="index-logninv-2531"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the quantile (the inverse of the CDF) at <var>x</var> of the lognormal distribution with parameters <var>mu</var> and <var>sigma</var>. If a random variable follows this distribution, its logarithm is normally distributed with mean <code>log (</code><var>mu</var><code>)</code> and variance <var>sigma</var>. <p>Default values are <var>mu</var> = 1, <var>sigma</var> = 1. </p></blockquote></div> <!-- nbinpdf scripts/statistics/distributions/nbinpdf.m --> <p><a name="doc_002dnbinpdf"></a> <div class="defun"> — Function File: <b>nbinpdf</b> (<var>x, n, p</var>)<var><a name="index-nbinpdf-2532"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the probability density function (PDF) at <var>x</var> of the negative binomial distribution with parameters <var>n</var> and <var>p</var>. <p>When <var>n</var> is integer this is the Pascal distribution. When <var>n</var> is extended to real numbers this is the Polya distribution. <p>The number of failures in a Bernoulli experiment with success probability <var>p</var> before the <var>n</var>-th success follows this distribution. </p></blockquote></div> <!-- nbincdf scripts/statistics/distributions/nbincdf.m --> <p><a name="doc_002dnbincdf"></a> <div class="defun"> — Function File: <b>nbincdf</b> (<var>x, n, p</var>)<var><a name="index-nbincdf-2533"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the cumulative distribution function (CDF) at <var>x</var> of the negative binomial distribution with parameters <var>n</var> and <var>p</var>. <p>When <var>n</var> is integer this is the Pascal distribution. When <var>n</var> is extended to real numbers this is the Polya distribution. <p>The number of failures in a Bernoulli experiment with success probability <var>p</var> before the <var>n</var>-th success follows this distribution. </p></blockquote></div> <!-- nbininv scripts/statistics/distributions/nbininv.m --> <p><a name="doc_002dnbininv"></a> <div class="defun"> — Function File: <b>nbininv</b> (<var>x, n, p</var>)<var><a name="index-nbininv-2534"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the quantile (the inverse of the CDF) at <var>x</var> of the negative binomial distribution with parameters <var>n</var> and <var>p</var>. <p>When <var>n</var> is integer this is the Pascal distribution. When <var>n</var> is extended to real numbers this is the Polya distribution. <p>The number of failures in a Bernoulli experiment with success probability <var>p</var> before the <var>n</var>-th success follows this distribution. </p></blockquote></div> <!-- normpdf scripts/statistics/distributions/normpdf.m --> <p><a name="doc_002dnormpdf"></a> <div class="defun"> — Function File: <b>normpdf</b> (<var>x</var>)<var><a name="index-normpdf-2535"></a></var><br> — Function File: <b>normpdf</b> (<var>x, mu, sigma</var>)<var><a name="index-normpdf-2536"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the probability density function (PDF) at <var>x</var> of the normal distribution with mean <var>mu</var> and standard deviation <var>sigma</var>. <p>Default values are <var>mu</var> = 0, <var>sigma</var> = 1. </p></blockquote></div> <!-- normcdf scripts/statistics/distributions/normcdf.m --> <p><a name="doc_002dnormcdf"></a> <div class="defun"> — Function File: <b>normcdf</b> (<var>x</var>)<var><a name="index-normcdf-2537"></a></var><br> — Function File: <b>normcdf</b> (<var>x, mu, sigma</var>)<var><a name="index-normcdf-2538"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the cumulative distribution function (CDF) at <var>x</var> of the normal distribution with mean <var>mu</var> and standard deviation <var>sigma</var>. <p>Default values are <var>mu</var> = 0, <var>sigma</var> = 1. </p></blockquote></div> <!-- norminv scripts/statistics/distributions/norminv.m --> <p><a name="doc_002dnorminv"></a> <div class="defun"> — Function File: <b>norminv</b> (<var>x</var>)<var><a name="index-norminv-2539"></a></var><br> — Function File: <b>norminv</b> (<var>x, mu, sigma</var>)<var><a name="index-norminv-2540"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the quantile (the inverse of the CDF) at <var>x</var> of the normal distribution with mean <var>mu</var> and standard deviation <var>sigma</var>. <p>Default values are <var>mu</var> = 0, <var>sigma</var> = 1. </p></blockquote></div> <!-- poisspdf scripts/statistics/distributions/poisspdf.m --> <p><a name="doc_002dpoisspdf"></a> <div class="defun"> — Function File: <b>poisspdf</b> (<var>x, lambda</var>)<var><a name="index-poisspdf-2541"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the probability density function (PDF) at <var>x</var> of the Poisson distribution with parameter <var>lambda</var>. </p></blockquote></div> <!-- poisscdf scripts/statistics/distributions/poisscdf.m --> <p><a name="doc_002dpoisscdf"></a> <div class="defun"> — Function File: <b>poisscdf</b> (<var>x, lambda</var>)<var><a name="index-poisscdf-2542"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the cumulative distribution function (CDF) at <var>x</var> of the Poisson distribution with parameter lambda. </p></blockquote></div> <!-- poissinv scripts/statistics/distributions/poissinv.m --> <p><a name="doc_002dpoissinv"></a> <div class="defun"> — Function File: <b>poissinv</b> (<var>x, lambda</var>)<var><a name="index-poissinv-2543"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the quantile (the inverse of the CDF) at <var>x</var> of the Poisson distribution with parameter <var>lambda</var>. </p></blockquote></div> <!-- stdnormal_pdf scripts/statistics/distributions/stdnormal_pdf.m --> <p><a name="doc_002dstdnormal_005fpdf"></a> <div class="defun"> — Function File: <b>stdnormal_pdf</b> (<var>x</var>)<var><a name="index-stdnormal_005fpdf-2544"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the probability density function (PDF) at <var>x</var> of the standard normal distribution (mean = 0, standard deviation = 1). </p></blockquote></div> <!-- stdnormal_cdf scripts/statistics/distributions/stdnormal_cdf.m --> <p><a name="doc_002dstdnormal_005fcdf"></a> <div class="defun"> — Function File: <b>stdnormal_cdf</b> (<var>x</var>)<var><a name="index-stdnormal_005fcdf-2545"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the cumulative distribution function (CDF) at <var>x</var> of the standard normal distribution (mean = 0, standard deviation = 1). </p></blockquote></div> <!-- stdnormal_inv scripts/statistics/distributions/stdnormal_inv.m --> <p><a name="doc_002dstdnormal_005finv"></a> <div class="defun"> — Function File: <b>stdnormal_inv</b> (<var>x</var>)<var><a name="index-stdnormal_005finv-2546"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the quantile (the inverse of the CDF) at <var>x</var> of the standard normal distribution (mean = 0, standard deviation = 1). </p></blockquote></div> <!-- tpdf scripts/statistics/distributions/tpdf.m --> <p><a name="doc_002dtpdf"></a> <div class="defun"> — Function File: <b>tpdf</b> (<var>x, n</var>)<var><a name="index-tpdf-2547"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the probability density function (PDF) at <var>x</var> of the <var>t</var> (Student) distribution with <var>n</var> degrees of freedom. </p></blockquote></div> <!-- tcdf scripts/statistics/distributions/tcdf.m --> <p><a name="doc_002dtcdf"></a> <div class="defun"> — Function File: <b>tcdf</b> (<var>x, n</var>)<var><a name="index-tcdf-2548"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the cumulative distribution function (CDF) at <var>x</var> of the t (Student) distribution with <var>n</var> degrees of freedom, i.e., PROB (t(<var>n</var>) ≤ <var>x</var>). </p></blockquote></div> <!-- tinv scripts/statistics/distributions/tinv.m --> <p><a name="doc_002dtinv"></a> <div class="defun"> — Function File: <b>tinv</b> (<var>x, n</var>)<var><a name="index-tinv-2549"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the quantile (the inverse of the CDF) at <var>x</var> of the t (Student) distribution with <var>n</var> degrees of freedom. This function is analogous to looking in a table for the t-value of a single-tailed distribution. </p></blockquote></div> <!-- unidpdf scripts/statistics/distributions/unidpdf.m --> <p><a name="doc_002dunidpdf"></a> <div class="defun"> — Function File: <b>unidpdf</b> (<var>x, n</var>)<var><a name="index-unidpdf-2550"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the probability density function (PDF) at <var>x</var> of a discrete uniform distribution which assumes the integer values 1–<var>n</var> with equal probability. <p>Warning: The underlying implementation uses the double class and will only be accurate for <var>n</var> ≤ <code>bitmax</code> (2^53 - 1<!-- /@w --> on IEEE-754 compatible systems). </p></blockquote></div> <!-- unidcdf scripts/statistics/distributions/unidcdf.m --> <p><a name="doc_002dunidcdf"></a> <div class="defun"> — Function File: <b>unidcdf</b> (<var>x, n</var>)<var><a name="index-unidcdf-2551"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the cumulative distribution function (CDF) at <var>x</var> of a discrete uniform distribution which assumes the integer values 1–<var>n</var> with equal probability. </p></blockquote></div> <!-- unidinv scripts/statistics/distributions/unidinv.m --> <p><a name="doc_002dunidinv"></a> <div class="defun"> — Function File: <b>unidinv</b> (<var>x, n</var>)<var><a name="index-unidinv-2552"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the quantile (the inverse of the CDF) at <var>x</var> of the discrete uniform distribution which assumes the integer values 1–<var>n</var> with equal probability. </p></blockquote></div> <!-- unifpdf scripts/statistics/distributions/unifpdf.m --> <p><a name="doc_002dunifpdf"></a> <div class="defun"> — Function File: <b>unifpdf</b> (<var>x</var>)<var><a name="index-unifpdf-2553"></a></var><br> — Function File: <b>unifpdf</b> (<var>x, a, b</var>)<var><a name="index-unifpdf-2554"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the probability density function (PDF) at <var>x</var> of the uniform distribution on the interval [<var>a</var>, <var>b</var>]. <p>Default values are <var>a</var> = 0, <var>b</var> = 1. </p></blockquote></div> <!-- unifcdf scripts/statistics/distributions/unifcdf.m --> <p><a name="doc_002dunifcdf"></a> <div class="defun"> — Function File: <b>unifcdf</b> (<var>x</var>)<var><a name="index-unifcdf-2555"></a></var><br> — Function File: <b>unifcdf</b> (<var>x, a, b</var>)<var><a name="index-unifcdf-2556"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the cumulative distribution function (CDF) at <var>x</var> of the uniform distribution on the interval [<var>a</var>, <var>b</var>]. <p>Default values are <var>a</var> = 0, <var>b</var> = 1. </p></blockquote></div> <!-- unifinv scripts/statistics/distributions/unifinv.m --> <p><a name="doc_002dunifinv"></a> <div class="defun"> — Function File: <b>unifinv</b> (<var>x</var>)<var><a name="index-unifinv-2557"></a></var><br> — Function File: <b>unifinv</b> (<var>x, a, b</var>)<var><a name="index-unifinv-2558"></a></var><br> <blockquote><p>For each element of <var>x</var>, compute the quantile (the inverse of the CDF) at <var>x</var> of the uniform distribution on the interval [<var>a</var>, <var>b</var>]. <p>Default values are <var>a</var> = 0, <var>b</var> = 1. </p></blockquote></div> <!-- wblpdf scripts/statistics/distributions/wblpdf.m --> <p><a name="doc_002dwblpdf"></a> <div class="defun"> — Function File: <b>wblpdf</b> (<var>x</var>)<var><a name="index-wblpdf-2559"></a></var><br> — Function File: <b>wblpdf</b> (<var>x, scale</var>)<var><a name="index-wblpdf-2560"></a></var><br> — Function File: <b>wblpdf</b> (<var>x, scale, shape</var>)<var><a name="index-wblpdf-2561"></a></var><br> <blockquote><p>Compute the probability density function (PDF) at <var>x</var> of the Weibull distribution with scale parameter <var>scale</var> and shape parameter <var>shape</var> which is given by <pre class="example"> shape * scale^(-shape) * x^(shape-1) * exp (-(x/scale)^shape) </pre> <p class="noindent">for <var>x</var> ≥ 0. <p>Default values are <var>scale</var> = 1, <var>shape</var> = 1. </p></blockquote></div> <!-- wblcdf scripts/statistics/distributions/wblcdf.m --> <p><a name="doc_002dwblcdf"></a> <div class="defun"> — Function File: <b>wblcdf</b> (<var>x</var>)<var><a name="index-wblcdf-2562"></a></var><br> — Function File: <b>wblcdf</b> (<var>x, scale</var>)<var><a name="index-wblcdf-2563"></a></var><br> — Function File: <b>wblcdf</b> (<var>x, scale, shape</var>)<var><a name="index-wblcdf-2564"></a></var><br> <blockquote><p>Compute the cumulative distribution function (CDF) at <var>x</var> of the Weibull distribution with scale parameter <var>scale</var> and shape parameter <var>shape</var>, which is <pre class="example"> 1 - exp (-(x/scale)^shape) </pre> <p class="noindent">for <var>x</var> ≥ 0. <p>Default values are <var>scale</var> = 1, <var>shape</var> = 1. </p></blockquote></div> <!-- wblinv scripts/statistics/distributions/wblinv.m --> <p><a name="doc_002dwblinv"></a> <div class="defun"> — Function File: <b>wblinv</b> (<var>x</var>)<var><a name="index-wblinv-2565"></a></var><br> — Function File: <b>wblinv</b> (<var>x, scale</var>)<var><a name="index-wblinv-2566"></a></var><br> — Function File: <b>wblinv</b> (<var>x, scale, shape</var>)<var><a name="index-wblinv-2567"></a></var><br> <blockquote><p>Compute the quantile (the inverse of the CDF) at <var>x</var> of the Weibull distribution with scale parameter <var>scale</var> and shape parameter <var>shape</var>. <p>Default values are <var>scale</var> = 1, <var>shape</var> = 1. </p></blockquote></div> </body></html>