distIneqMassartPlot function

Massart Inequality Plot Function

Massart Inequality Plot Function

Creates a Massart inequality plot for testing the empirical distribution and distribution function based on an inequality due to Massart (1990).

distIneqMassartPlot(densFn = "norm", param = NULL, nSamp = 50, n = 100, ...)

Arguments

  • densFn: Character. The root name of the distribution to be tested.
  • n: Numeric. The size of the sample to be used.
  • nSamp: Numeric. The number of samples used to approximate the LHS probability of the inequality.
  • param: Numeric. A vector giving the parameter values for the distribution specified by densFn. If no param values are specified, then the default parameter values of each distribution are used instead.
  • ...: Passes the parameters of the distribution other than specified by param.

Details

Massart (1990) gave a version of the Dvoretsky-Kiefer-Wolfowitz inequality with the best possible constant:

P(supxF^n(x)F(x)>t) P\left(\sup_{x}|\hat F_n(x)-F(x)|> t\right) \leq%2\exp(-2nt^2)%P(sup_x|F_n(x)-F(x)|> t) <= 2exp(-2nt^2)

where Fn F_n is the empirical distribution function for a sample of nn independent and identically distributed random variables with distribution function FF. This inequality is true for all distribution functions, for all nn and tt.

The red curve in the plot shows the LHS probabilities and the black curve gives the RHS bound. The red curve should lie below the black curve in order that the empirical distribution represents a sample from the theoretical distribution.

Returns

Returns NULL invisibly.

References

Massart P. (1990) The tight constant in the Dvoretsky-Kiefer-Wolfovitz inequality. Ann. Probab., 18 , 1269--1283.

Author(s)

David Scott d.scott@auckland.ac.nz , Xinxing Li xli053@aucklanduni.ac.nz

Examples

## Not run: ### Not run because of timing requirements of CRAN ### The Massart Inequality plot for standard Normal Distribution distIneqMassartPlot() ### The Massart Inequality plot for Gamma Distribution distIneqMassartPlot("gamma", shape = 1) ## End(Not run)
  • Maintainer: David Scott
  • License: GPL (>= 2)
  • Last published: 2025-03-29

Useful links