Empirical distribution function
Template:Short description Script error: No such module "Labelled list hatnote".
In statistics, an empirical distribution function (Template:Aka an empirical cumulative distribution function, eCDF) is the distribution function associated with the empirical measure of a sample.[1] This cumulative distribution function is a step function that jumps up by 1/nScript error: No such module "Check for unknown parameters". at each of the nScript error: No such module "Check for unknown parameters". data points. Its value at any specified value of the measured variable is the fraction of observations of the measured variable that are less than or equal to the specified value.
The empirical distribution function is an estimate of the cumulative distribution function that generated the points in the sample. It converges with probability 1 to that underlying distribution, according to the Glivenko–Cantelli theorem. A number of results exist to quantify the rate of convergence of the empirical distribution function to the underlying cumulative distribution function.
Definition
Let (X1, …, Xn)Script error: No such module "Check for unknown parameters". be independent, identically distributed real random variables with the common cumulative distribution function F(t)Script error: No such module "Check for unknown parameters".. Then the empirical distribution function is defined as[2]
where is the indicator of event AScript error: No such module "Check for unknown parameters".. For a fixed tScript error: No such module "Check for unknown parameters"., the indicator is a Bernoulli random variable with parameter p = F(t)Script error: No such module "Check for unknown parameters".; hence is a binomial random variable with mean nF(t)Script error: No such module "Check for unknown parameters". and variance nF(t)(1 − F(t))Script error: No such module "Check for unknown parameters".. This implies that is an unbiased estimator for F(t)Script error: No such module "Check for unknown parameters"..
However, in some textbooks, the definition is given as
Asymptotic properties
Since the ratio (n + 1)/nScript error: No such module "Check for unknown parameters". approaches 1 as nScript error: No such module "Check for unknown parameters". goes to infinity, the asymptotic properties of the two definitions that are given above are the same.
By the strong law of large numbers, the estimator converges to F(t)Script error: No such module "Check for unknown parameters". as n → ∞Script error: No such module "Check for unknown parameters". almost surely, for every value of tScript error: No such module "Check for unknown parameters".:[2]
thus the estimator is consistent. This expression asserts the pointwise convergence of the empirical distribution function to the true cumulative distribution function. There is a stronger result, called the Glivenko–Cantelli theorem, which states that the convergence in fact happens uniformly over tScript error: No such module "Check for unknown parameters".:[5]
The sup-norm in this expression is called the Kolmogorov–Smirnov statistic for testing the goodness-of-fit between the empirical distribution and the assumed true cumulative distribution function FScript error: No such module "Check for unknown parameters".. Other norm functions may be reasonably used here instead of the sup-norm. For example, the L2-norm gives rise to the Cramér–von Mises statistic.
The asymptotic distribution can be further characterized in several different ways. First, the central limit theorem states that pointwise, has asymptotically normal distribution with the standard rate of convergence:[2]
This result is extended by the Donsker’s theorem, which asserts that the empirical process , viewed as a function indexed by , converges in distribution in the Skorokhod space to the mean-zero Gaussian process , where BScript error: No such module "Check for unknown parameters". is the standard Brownian bridge.[5] The covariance structure of this Gaussian process is
The uniform rate of convergence in Donsker’s theorem can be quantified by the result known as the Hungarian embedding:[6]
Alternatively, the rate of convergence of can also be quantified in terms of the asymptotic behavior of the sup-norm of this expression. Number of results exist in this venue, for example the Dvoretzky–Kiefer–Wolfowitz inequality provides bound on the tail probabilities of :[6]
In fact, Kolmogorov has shown that if the cumulative distribution function FScript error: No such module "Check for unknown parameters". is continuous, then the expression converges in distribution to , which has the Kolmogorov distribution that does not depend on the form of FScript error: No such module "Check for unknown parameters"..
Another result, which follows from the law of the iterated logarithm, is that [6]
and
Confidence intervals
As per Dvoretzky–Kiefer–Wolfowitz inequality the interval that contains the true CDF, , with probability is specified as
As per the above bounds, we can plot the Empirical CDF, CDF and confidence intervals for different distributions by using any one of the statistical implementations.
Statistical implementation
A non-exhaustive list of software implementations of Empirical Distribution function includes:
- In R software, we compute an empirical cumulative distribution function, with several methods for plotting, printing and computing with such an “ecdf” object.
- In MATLAB we can use Empirical cumulative distribution function (cdf) plot
- jmp from SAS, the CDF plot creates a plot of the empirical cumulative distribution function.
- Minitab, create an Empirical CDF
- Mathwave, we can fit probability distribution to our data
- Dataplot, we can plot Empirical CDF plot
- Scipy, we can use scipy.stats.ecdf
- Statsmodels, we can use statsmodels.distributions.empirical_distribution.ECDF
- Matplotlib, using the matplotlib.pyplot.ecdf function (new in version 3.8.0)[7]
- Seaborn, using the seaborn.ecdfplot function
- Plotly, using the plotly.express.ecdf function
- Excel, we can plot Empirical CDF plot
- ArviZ, using the az.plot_ecdf function
See also
- Càdlàg functions
- Count data
- Distribution fitting
- Dvoretzky–Kiefer–Wolfowitz inequality
- Empirical probability
- Empirical process
- Estimating quantiles from a sample
- Frequency (statistics)
- Empirical likelihood
- Kaplan–Meier estimator for censored processes
- Survival function
- Q–Q plot
References
<templatestyles src="Reflist/styles.css" />
- ↑ Script error: No such module "citation/CS1".
- ↑ a b c Script error: No such module "citation/CS1".
- ↑ Coles, S. (2001) An Introduction to Statistical Modeling of Extreme Values. Springer, p. 36, Definition 2.4. Template:ISBN.
- ↑ Madsen, H.O., Krenk, S., Lind, S.C. (2006) Methods of Structural Safety. Dover Publications. p. 148-149. Template:ISBN
- ↑ a b Script error: No such module "citation/CS1".
- ↑ a b c Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
Script error: No such module "Check for unknown parameters".
Further reading
- Script error: No such module "citation/CS1".
External links
Script error: No such module "Navbox".