UniformDistribution

UniformDistribution[{min,max}]
表示一个分布值位于 minmax 之间的连续均匀统计分布.

UniformDistribution[]
表示一个分布值位于 0 和 1 之间的均匀分布.

UniformDistribution[{{xmin,xmax},{ymin,ymax},}]
表示一个在区域 中的多元均匀分布.

更多信息更多信息

背景
背景

  • UniformDistribution[{a,b}] represents a statistical distribution (sometimes also known as the rectangular distribution) in which a random variate is equally likely to take any value in the interval . Consequently, the uniform distribution is parametrized entirely by the endpoints of its domain and its probability distribution function is constant on the interval . The standard uniform distribution, which may be returned using UniformDistribution[], is taken on the interval . The uniform distribution also generalizes to multiple variates, each of which is equally likely on some domain.
  • The inverse transform method, which allows sampling from an arbitrary distribution by applying the inverse of the cumulative density function of a target random variable to variates selected from a uniform distribution, is an important application of this distribution. Another important property is that when testing a null hypothesis using a p-value with continuous distribution as a test statistic, the p-value has a standard uniform distribution if the null hypothesis is true.
  • RandomVariate can be used to give one or more machine- or arbitrary-precision (the latter via the WorkingPrecision option) pseudorandom variates from a uniform distribution. Distributed[x,UniformDistribution[{a,b}]], written more concisely as , can be used to assert that a random variable x is distributed according to a uniform distribution. Such an assertion can then be used in functions such as Probability, NProbability, Expectation, and NExpectation.
  • The probability distribution and cumulative density functions may be given using PDF[UniformDistribution[{a,b}],x] and CDF[UniformDistribution[{a,b}],x]. The mean, median, variance, raw moments, and central moments may be computed using Mean, Median, Variance, Moment, and CentralMoment, respectively.
  • DistributionFitTest can be used to test if a given dataset is consistent with a uniform distribution, EstimatedDistribution to estimate a uniform parametric distribution from given data, and FindDistributionParameters to fit data to a uniform distribution. ProbabilityPlot can be used to generate a plot of the CDF of given data against the CDF of a symbolic uniform distribution and QuantilePlot to generate a plot of the quantiles of given data against the quantiles of a symbolic uniform distribution.
  • TransformedDistribution can be used to represent a transformed uniform distribution, CensoredDistribution to represent the distribution of values censored between upper and lower values, and TruncatedDistribution to represent the distribution of values truncated between upper and lower values. CopulaDistribution can be used to build higher-dimensional distributions that contain a uniform distribution and ProductDistribution can be used to compute a joint distribution with independent component distributions involving uniform distributions.
  • The uniform distribution is related to a number of other distributions. For example, UniformDistribution[] is a special case of BetaDistribution and PowerDistribution in the sense that (modulo inclusion of the endpoints and ), PDF[UniformDistribution[],x] is equal to both PDF[BetaDistribution[1,1],x] and PDF[PowerDistribution[1,1],x]. The discrete uniform distribution is given by DiscreteUniformDistribiution, and UniformSumDistribution generalizes the uniform distribution to the distribution of a sum of random uniform variates. The sum of two independent and equally distributed uniform distributions yields a symmetric TriangularDistribution. If has a standard uniform distribution, then has a BetaDistribution with parameters and 1. The probability distribution of the ^(th)-order statistic for an independent and identically distributed sample from a standard uniform distribution (which can be found using OrderDistribution[{UniformDistribution[],n},k]) is given by BetaDistribution[k,1-k+n], with the corresponding expected value of (which may be computed using Expectation[x,xBetaDistribution[k,1-k+n]]) given by . Other closely related distributions include VonMisesDistribution, LogisticDistribution, WeibullDistribution, LaplaceDistribution, BatesDistribution, and ChiSquareDistribution.

范例范例打开所有单元关闭所有单元

基本范例  (8)基本范例  (8)

单变量均匀分布的概率密度函数:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

单变量均匀分布的累积分布函数:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

单变量均匀分布的均值和方差:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

单变量均匀分布的中位数:

In[1]:=
Click for copyable input
Out[1]=

二维概率密度函数:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

二维累积分布函数:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

二维均值和方差:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

协方差:

In[1]:=
Click for copyable input
Out[1]//MatrixForm=
2007年引入
(6.0)
| 2010年更新
(8.0)