Estimate Parameters of a Uniform Distribution
Estimate the minimum and maximum parameters of a uniform distribution.
eunif(x, method = "mle")
x |
numeric vector of observations. Missing ( |
method |
character string specifying the method of estimation. The possible values are
|
If x
contains any missing (NA
), undefined (NaN
) or
infinite (Inf
, -Inf
) values, they will be removed prior to
performing the estimation.
Let \underline{x} = (x_1, x_2, …, x_n) be a vector of
n observations from an uniform distribution with
parameters min=
a and max=
b. Also, let x_{(i)}
denote the i'th order statistic.
Estimation
Maximum Likelihood Estimation (method="mle"
)
The maximum likelihood estimators (mle's) of a and b are given by
(Johnson et al, 1995, p.286):
\hat{a}_{mle} = x_{(1)} \;\;\;\; (1)
\hat{b}_{mle} = x_{(n)} \;\;\;\; (2)
Method of Moments Estimation (method="mme"
)
The method of moments estimators (mme's) of a and b are given by
(Forbes et al., 2011):
\hat{a}_{mme} = \bar{x} - √{3} s_m \;\;\;\; (3)
\hat{b}_{mme} = \bar{x} + √{3} s_m \;\;\;\; (4)
where
\bar{x} = \frac{1}{n} ∑_{i=1}^n x_i \;\;\;\; (5)
s^2_m = \frac{1}{n} ∑_{i=1}^n (x_i - \bar{x})^2 \;\;\;\; (6)
Method of Moments Estimation Based on the Unbiased Estimator of Variance (method="mmue"
)
The method of moments estimators based on the unbiased estimator of variance are
exactly the same as the method of moments estimators given in equations (3-6) above,
except that the method of moments estimator of variance in equation (6) is replaced
with the unbiased estimator of variance:
\hat{a}_{mmue} = \bar{x} - √{3} s \;\;\;\; (7)
\hat{b}_{mmue} = \bar{x} + √{3} s \;\;\;\; (8)
where
s^2 = \frac{1}{n-1} ∑_{i=1}^n (x_i - \bar{x})^2 \;\;\;\; (9)
a list of class "estimate"
containing the estimated parameters and other
information. See estimate.object
for details.
The uniform distribution (also called the rectangular
distribution) with parameters min
and max
takes on values on the
real line between min
and max
with equal probability. It has been
used to represent the distribution of round-off errors in tabulated values. Another
important application is that the distribution of the cumulative distribution
function (cdf) of any kind of continuous random variable follows a uniform
distribution with parameters min=0
and max=1
.
Steven P. Millard (EnvStats@ProbStatInfo.com)
Forbes, C., M. Evans, N. Hastings, and B. Peacock. (2011). Statistical Distributions. Fourth Edition. John Wiley and Sons, Hoboken, NJ.
Johnson, N. L., S. Kotz, and N. Balakrishnan. (1995). Continuous Univariate Distributions, Volume 2. Second Edition. John Wiley and Sons, New York.
# Generate 20 observations from a uniform distribution with parameters # min=-2 and max=3, then estimate the parameters via maximum likelihood. # (Note: the call to set.seed simply allows you to reproduce this example.) set.seed(250) dat <- runif(20, min = -2, max = 3) eunif(dat) #Results of Distribution Parameter Estimation #-------------------------------------------- # #Assumed Distribution: Uniform # #Estimated Parameter(s): min = -1.574529 # max = 2.837006 # #Estimation Method: mle # #Data: dat # #Sample Size: 20 #---------- # Compare the three methods of estimation: eunif(dat, method = "mle")$parameters # min max #-1.574529 2.837006 eunif(dat, method = "mme")$parameters # min max #-1.988462 2.650737 eunif(dat, method = "mmue")$parameters # min max #-2.048721 2.710996 #---------- # Clean up #--------- rm(dat)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.