Difference between revisions of "Template:Infobox probability distribution"

From blackwiki
Jump to navigation Jump to search
imported>DinoD123
(made PMF be in all caps)
 
(45 intermediate revisions by 26 users not shown)
Line 1: Line 1:
{| class="infobox bordered wikitable" style="width: 325px; font-size: 95%; margin-left: 1em; margin-bottom: 0.5em;"
+
{{infobox3cols
|+ {{{name}}}
+
| bodyclass      = bordered
|- style="text-align: center;"
+
| bodystyle      = width: {{{box_width|325px}}}; max-width: {{{box_width|325px}}}; font-size: 95%;
| colspan="2" | Probability {{{type}}} function<br />{{{pdf_image}}}
 
|- style="text-align: center;"
 
| colspan="2" | Cumulative distribution function<br />{{{cdf_image}}}
 
|- valign="top"
 
! Parameters
 
| {{{parameters}}}
 
|-
 
! [[Support (mathematics)|Support]]
 
| {{{support}}}
 
|-
 
! {{Probability distribution/link {{{type}}}}}
 
| {{{pdf}}}
 
|-
 
! [[Cumulative distribution function]] (cdf)
 
| {{{cdf}}}
 
|-
 
! [[expected value|Mean]]
 
| {{{mean}}}
 
|-
 
! [[Median]]
 
| {{{median}}}
 
|-
 
! [[Mode (statistics)|Mode]]
 
| {{{mode}}}
 
|-
 
! [[Variance]]
 
| {{{variance}}}
 
|-
 
! [[Skewness]]
 
| {{{skewness}}}
 
|-
 
! Excess [[kurtosis]]
 
| {{{kurtosis}}}
 
|-
 
! [[Information entropy|Entropy]]
 
| {{{entropy}}}
 
|-
 
! [[Moment-generating function]] (mgf)
 
| {{{mgf}}}
 
|-
 
! [[Characteristic function (probability theory)|Characteristic function]]
 
| {{{char}}}
 
|}<noinclude>
 
[[Category:Mathematics and abstraction infobox templates|{{PAGENAME}}]]
 
  
[[ja:Template:確率分布]]
+
| title          = {{{name|}}}
[[pl:Szablon:Rozkład prawdopodobieństwa infobox]]
+
| subheaderstyle = text-align:left;
[[zh:Template:機率分佈]]
+
| subheader      =  {{{intro|}}}
 +
 
 +
| image1        = {{#if: {{{pdf_image|}}}|<div>{{#switch: {{{type|<noinclude>discrete</noinclude>}}} | discrete | mass = Probability mass function | multivariate | continuous | density = Probability density function }}</div>{{#invoke:InfoboxImage|InfoboxImage|image={{{pdf_image}}}|alt={{{pdf_image_alt|}}}}}}}
 +
| caption1      = {{{pdf_caption|}}}
 +
 
 +
| image2        = {{#if: {{{cdf_image|}}}|<div>Cumulative distribution function</div>{{#invoke:InfoboxImage|InfoboxImage|image={{{cdf_image}}}|alt={{{cdf_image_alt|}}}}}}}
 +
| caption2      = {{{cdf_caption|}}}
 +
 
 +
| label1        = Notation
 +
| data1          = {{{notation|}}}
 +
 
 +
| label2        = Parameters
 +
| data2          = {{#if: {{{parameters2|}}} | | {{{parameters|}}} }}
 +
| data2a        = {{{parameters|}}}
 +
| data2b        = {{{parameters2|}}}
 +
 
 +
| label3        = [[Support (mathematics)|Support]]
 +
| data3          = {{#if: {{{support2|}}} | | {{{support|}}} }}
 +
| data3a        = {{{support|}}}
 +
| data3b        = {{{support2|}}}
 +
 
 +
| label4        = {{#switch: {{{type|<noinclude>discrete</noinclude>}}}
 +
                  | discrete | mass = [[Probability mass function|PMF]]
 +
                  | multivariate | continuous | density = [[Probability density function|PDF]]
 +
                  | #default = {{Error|Unknown type}}
 +
                  }}
 +
| data4          = {{#if: {{{pdf2|}}} | | {{{pdf|}}} }}
 +
| data4a        = {{{pdf|}}}
 +
| data4b        = {{{pdf2|}}}
 +
 
 +
| label5        = [[Cumulative distribution function|CDF]]
 +
| data5          = {{#if: {{{cdf2|}}} | | {{{cdf|}}} }}
 +
| data5a        = {{{cdf|}}}
 +
| data5b        = {{{cdf2|}}}
 +
 
 +
| label6        = [[Quantile function|Quantile]]
 +
| data6          = {{{quantile|}}}
 +
 
 +
| label7        = [[Expected value|Mean]]
 +
| data7          = {{#if: {{{mean2|}}} | | {{{mean|}}} }}
 +
| data7a        = {{{mean|}}}
 +
| data7b        = {{{mean2|}}}
 +
 
 +
| label8        = [[Median]]
 +
| data8          = {{#if: {{{median2|}}} | | {{{median|}}} }}
 +
| data8a        = {{{median|}}}
 +
| data8b        = {{{median2|}}}
 +
 
 +
| label9        = [[Mode (statistics)|Mode]]
 +
| data9          = {{#if: {{{mode2|}}} | | {{{mode|}}} }}
 +
| data9a        = {{{mode|}}}
 +
| data9b        = {{{mode2|}}}
 +
 
 +
| label10        = {{#switch: {{{type|<noinclude>discrete</noinclude>}}}
 +
                  | discrete | continuous | mass | density = [[Variance]]
 +
                  | multivariate = [[Covariance matrix|Variance]]
 +
                  | #default = {{Error|Unknown type}}
 +
                  }}
 +
| data10        = {{#if: {{{variance2|}}} | | {{{variance|}}} }}
 +
| data10a        = {{{variance|}}}
 +
| data10b        = {{{variance2|}}}
 +
 
 +
| label11        = [[average absolute deviation|MAD]]
 +
| data11        = {{#if: {{{mad2|}}} | | {{{mad|}}} }}
 +
| data11a        = {{{mad|}}}
 +
| data11b        = {{{mad2|}}}
 +
 
 +
| label12        = [[Skewness]]
 +
| data12        = {{#if: {{{skewness2|}}} | | {{{skewness|}}} }}
 +
| data12a        = {{{skewness|}}}
 +
| data12b        = {{{skewness2|}}}
 +
 
 +
| label13        = [[Excess kurtosis|Ex. kurtosis]]
 +
| data13        = {{#if: {{{kurtosis2|}}} | | {{{kurtosis|}}} }}
 +
| data13a        = {{{kurtosis|}}}
 +
| data13b        = {{{kurtosis2|}}}
 +
 
 +
| label14        = [[Information entropy|Entropy]]
 +
| data14        = {{#if: {{{entropy2|}}} | | {{{entropy|}}} }}
 +
| data14a        = {{{entropy|}}}
 +
| data14b        = {{{entropy2|}}}
 +
 
 +
| label15        = [[Moment-generating function|MGF]]
 +
| data15        = {{#if: {{{mgf2|}}} | | {{{mgf|}}} }}
 +
| data15a        = {{{mgf|}}}
 +
| data15b        = {{{mgf2|}}}
 +
 
 +
| label16        = [[Characteristic function (probability theory)|CF]]
 +
| data16        = {{#if: {{{char2|{{{cf2|}}}}}} | | {{{char|{{{cf|}}}}}} }}
 +
| data16a        = {{{char|{{{cf|}}}}}}
 +
| data16b        = {{{char2|{{{cf2|}}}}}}
 +
 
 +
| label17        = [[Probability-generating function|PGF]]
 +
| data17        = {{{pgf|}}}
 +
 
 +
| label18        = [[Fisher information]]
 +
| data18        = {{{fisher|}}}
 +
 
 +
| label19        = [[Kullback-Leibler divergence]]
 +
| data19        = {{{KLDiv|}}}
 +
 
 +
| label20        = [[Jensen-Shannon divergence]]
 +
| data20        = {{{JSDdiv|}}}
 +
 
 +
| label21        = [[Method of moments (statistics)|Method of Moments]]
 +
| data21        = {{#if: {{{moments2|}}} | | {{{moments|}}} }}
 +
| data21a        = {{{moments|}}}
 +
| data21b        = {{{moments2|}}}
 +
 
 +
}}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using infobox probability distribution with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Infobox probability distribution]] with unknown parameter "_VALUE_"|ignoreblank=y| box_width | cdf | cdf_caption | cdf_image | cdf_image_alt | cdf2 | cf | cf2 | char | char2 | entropy | entropy2 | fisher | intro | JSDdiv | KLDiv | kurtosis | kurtosis2 | mad | mad2 | mean | mean2 | median | median2 | mgf | mgf2 | mode | mode2 | moments | moments2 | name | notation | parameters | parameters2 | pdf | pdf_caption | pdf_image | pdf_image_alt | pdf2 | pgf | quantile | skewness | skewness2 | support | support2 | type | variance | variance2 }}<noinclude>
 +
{{Documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 17:44, 31 August 2020

[[Category:Infobox templates|Template:Remove first word ]]

Template documentation[view] [edit] [history] [purge]

Usage

The Template:Infobox probability distribution generates a right-hand side infobox, based on the specified parameters. To use this template, copy the following code in your article and fill in as appropriate:

{{Infobox probability distribution
| name       = 
| type       = 
| pdf_image  = 
| cdf_image  = 
| notation   = 
| parameters = 
| support    = 
| pdf        = 
| cdf        = 
| quantile   = 
| mean       = 
| median     = 
| mode       = 
| variance   = 
| mad        = 
| skewness   = 
| kurtosis   = 
| entropy    = 
| mgf        = 
| cf         = 
| pgf        = 
| fisher     = 
| moments    = 
| KLdiv      = 
| JSDiv      = 
}}

Parameters

  • |name= — Name at the top of the infobox; should be the name of the distribution without the word "distribution" in it, e.g. "Normal", "Exponential" (optional)
  • |type= — possible values are "discrete" (or "mass"), "continuous" (or "density"), and "multivariate"
  • |pdf_image= — probability density image-spec, such as: xxx.svg.
  • |pdf_caption= — probability density image caption
  • |pdf_image_alt=alternative text for the image in |pdf_image=
  • |cdf_image= — cumulative distribution image-spec, such as: yyy.svg.
  • |cdf_caption= — cumulative distribution image caption
  • |cdf_image_alt=alternative text for the image in |cdf_image=
  • |notation= — typical designation for this distribution, for example <math>\mathcal{N}(\mu,\sigma^2)</math>. The notation should include all the distribution parameters explained in the next cell.
  • |parameters= — parameters of the distribution family (such as Template:Mvar and σ2 for the normal distribution).
  • |support= — the support of the distribution, which may depend on the parameters. Specify this as <math>x \in some set</math> for continuous distributions, and as <math>k \in some set</math> for discrete distributions.
  • |pdf= — probability density function (or probability mass function), such as: <math>\frac{\Gamma(r+k)}{k!\Gamma(r)}p^r(1-p)^k</math>. Please exclude the function label, such as "ƒ(x; μ,σ2)".
  • |cdf= — cumulative distribution function, e.g.: <math>I_p(r,k+1)\text{ where }I_p(x,y)</math> is the [[regularized incomplete beta function]].
  • |quantile=quantile function (or inverse cumulative distribution function). If <math>F()</math> is the CDF and <math>Q()</math> is the quantile function, then <math>Q(F(x))=x</math>
  • |mean= — the mean, or expected value.
  • |median= — the median, only for univariate distributions.
  • |mode= — the mode.
  • |variance=variance of the distribution, or covariance matrix in multivariate case.
  • |mad= — the mean absolute deviation.
  • |skewness= — the skewness.
  • |kurtosis= — the kurtosis excess.
  • |entropy= — the differential information entropy, preferably expressed in unspecified units using base-unspecific log(.) rather than base-specific ln(.) which yields entropy in units of nats only.
  • |mgf= — the moment-generating function, for example: <math>\left(\frac{p}{1-(1-p) e^t}\right)^r</math>.
  • |char=/|cf= — the characteristic function, such as: <math>\left(\frac{p}{1-(1-p) e^{it}}\right)^r</math>.
  • |pgf= - the Probability-generating function.
  • |fisher= — the Fisher information matrix for the model.
  • |KLDiv= — the Kullback-Leibler divergence of the model
  • |JSDiv= — the Jensen-Shannon divergence of the model
  • |moments= — formulas to use in Method of moments for the model.
  • |intro= — optional message which will be displayed before all other content in the infobox.
  • |marginleft= — margin space left of infobox (default: 1em).
  • |box_width= — width of the infobox (default: 325px).

|parameters2=, |support2=, |pdf2=, |cdf2=, |mean2=, |median2=, |mode2=, |variance2=, |mad=, |skewness2=, |kurtosis2=, |entropy2=, |mgf2=, |char2=/|cf2=, and |moments2= are the same as their counterparts above. They should be used when the distribution needs two sets to describe it, e.g. Gamma distribution.

Tracking category