The Uniform distribution is the simplest probability distribution. Still, it plays an important role in statistics since it is very useful in modeling random variables. The uniform distribution is a continuous probability distribution and is concerned with events that are equally likely to occur. The continuous random variable X is said to be uniformly distributed or have a rectangular distribution in the interval [a,b]. We write X∼U(a,b), if its probability density function equals f(x)=1b−a,x∈[a,b], and 0 elsewhere (Lovric 2011)).
f(x)={1b−a,when a≤x≤b0,when x<a or x>b
The figure below shows a continuous uniform distribution of the form X∼U(−2,0.8). This is a distribution where all values of x within the interval [-2,0.8] are 1b−a(=10.8−(−2)=0.36), whereas all other values of x are 0.
The mean and the median are given by
μ=a+b2.
The cumulative density function is shown below and given by the equation
F(x)={0,for x<ax−ab−a,for x∈[a,b)1,for x≥b
Citation
The E-Learning project SOGA-R was developed at the Department of Earth Sciences by Kai Hartmann, Joachim Krois and Annette Rudolph. You can reach us via mail by soga[at]zedat.fu-berlin.de.
Please cite as follow: Hartmann, K., Krois, J., Rudolph, A. (2023): Statistics and Geodata Analysis using R (SOGA-R). Department of Earth Sciences, Freie Universitaet Berlin.