Member-only story

Statistics interview question: What is a uniform random variable?

Crystal X
2 min readJan 20, 2025

--

In order to get a grasp of statistics, it is important to understand the different distributions and the variables that are associated with them.

Uniform distribution

The discrete uniform distribution, or rectangle, is a symmetric probability distribution wherein a finite number of values are equally likely to be observed, with every one of n values having equal probability 1/n. In short, every event from a to b is equally likely to occur.

The formula for the discrete uniform distribution is:-

A uniform distribution can be created in Python by using numpy random function, as seen below:-

Uniform random variable

A uniform random variable is a type of continuous random variable where all outcomes within a specific range are equally likely. This means that the probability of the variable taking any value within this range is constant.

--

--

Crystal X
Crystal X

Written by Crystal X

I have over five decades experience in the world of work, being in fast food, the military, business, non-profits, and the healthcare sector.

No responses yet