June 21st, 2024

Do not confuse a random variable with its distribution

In probability theory, a random variable and its distribution are distinct concepts. The random variable depends on random outcomes, while the distribution shows variation patterns. Changing variables or probabilities alters distributions. Examples clarify shared distributions with different outcomes, crucial for interpreting probabilities and simulations.

Read original articleLink Icon
Do not confuse a random variable with its distribution

The article discusses the distinction between a random variable and its distribution in probability theory. A random variable represents a numerical quantity dependent on random outcomes, while its distribution describes the pattern of variation in values over multiple repetitions of the random process. Changing either the probability measure or the random variable alters the distribution. For instance, different scenarios with a fair four-sided die yield random variables with distinct distributions. The article emphasizes that two random variables can have the same distribution but measure different outcomes, illustrated by examples involving coin flips and arrival times. Understanding this concept is crucial for correctly interpreting probabilities and simulations. The text also touches on common distributions like Binomial and explains that knowing a random variable's distribution does not reveal the underlying outcomes being measured. The article concludes by highlighting that two random variables can share a distribution even if defined on different sample spaces, emphasizing the importance of grasping the relationship between random variables and their distributions in probability theory.

Related

There's more to mathematics than rigour and proofs (2007)

There's more to mathematics than rigour and proofs (2007)

The article explores mathematical education stages: pre-rigorous, rigorous, and post-rigorous. It stresses combining formalism with intuition for effective problem-solving, highlighting the balance between rigor and intuition in mathematics development.

Everyday is a Birthday A Journey to a classic problem through Math and Rust

Everyday is a Birthday A Journey to a classic problem through Math and Rust

This article explores the classic probability problem of ensuring every day of the year is represented by a birthday in a group of people, using mathematical concepts like the Coupon Collector Problem and Inclusion-Exclusion Principle. It calculates needing around 2364 students, adjusting to 2669 with leap days, and discusses the gamma function for probability calculation.

I've stopped using box plots (2021)

I've stopped using box plots (2021)

The author critiques box plots for being unintuitive and prone to misinterpretation, advocating for simpler alternatives like strip plots to effectively communicate distribution insights without confusing audiences.

We must seek a widely-applicable Science of Systems

We must seek a widely-applicable Science of Systems

The text discusses the importance of a Science of Systems, focusing on Complex Systems. Emphasizing computer science's role, it explores potential applications in various fields and advocates for scientific progress through unified theories.

A brief introduction to interval arithmetic

A brief introduction to interval arithmetic

Interval arithmetic deals with uncertainties by using intervals instead of exact numbers. It offers accuracy in calculations but faces challenges like complexities and overestimation. Despite evolving, it finds applications in diverse fields.

Link Icon 15 comments
By @eru - 4 months
> A random variable measures a numerical quantity which depends on the outcome of a random phenomenon.

Hmm, that sentence at the beginning is already wrong. Random variables can measure anything, not just numbers. Heads or Tails of a coin, or colours of cars etc.

It's fine to restrict yourself to numeric random variables only. But if you are writing a rant telling other people to be more careful in their analysis, you better dot your i's and cross your t's yourself.

By @auraai - 4 months
This is pretty important in mathematical finance, where one moves from a real-world measure to a risk-neutral measure to make computations feasible.

https://en.wikipedia.org/wiki/Girsanov_theorem https://en.wikipedia.org/wiki/Risk-neutral_measure

By @btown - 4 months
For the code-minded out there, a "random variable" is something of a lazily evaluated value that can be "sampled" and emit a quantity (or a vector/tensor thereof) each time. And the OP article boils down to the fact that it's generally incorrect to assume that any random variable can be represented solely by its unconditional probability distribution; a distribution is more of a visualization than a sufficient definition. Rather, one must track the entire graph of other random variables that may feed the current one (e.g. that the current one is conditional on), akin to how an Excel spreadsheet models all the dependencies of a cell.

The fun part comes when you can ask this computation graph: "what parameters for a random variable early on in the chain would be the ones that optimize some function of variables later in the chain?" And, handwaving a ton of nuance here, when those parameters are weights in a neural network, the function is a loss function on the training data, and the optimization is done by automatic differentiation (e.g. https://pytorch.org/tutorials/beginner/introyt/autogradyt_tu...), you have modern AI.

If you're interested in the theoretical underpinnings here, Bishop's PRML is perhaps the classic starting point: https://www.microsoft.com/en-us/research/uploads/prod/2006/0...

By @panic - 4 months
There’s an interesting connection here to another article on the front page: https://news.ycombinator.com/item?id=40794786

In that article, squaring a number in interval arithmetic is different from multiplying two independent numbers with the same interval. Here, squaring a random variable is different from multiplying two independent random variables with the same distribution.

By @condwanaland - 4 months
Love to see things built with bookdown, which is such an awesome R package (although it's successor, Quarto, is much better and simpler)
By @jhrmnn - 4 months
In quantum mechanics, the measurement and observation are two sides of the same coin, and the sample space is _defined_ by the random variable (observable) of interest, so it makes a little less sense to separate the two. (There is no hidden observation-independent sample space.)
By @kazinator - 4 months
Who confuses a random variable with its distribution, and what does that mistake look like? I don't get it.
By @dwqwdqd - 4 months
Does this work?

X = 1 with probability 0.5, 0 with probability 0.5 Y = 0 when X = 1, 1 when X = 0 (for the \omega for which X(\omega) = 1, Y(\omega) = 0).

They're both bernoulli distributions with p=0.5 (i.e. they follow the same distribution) and P(X=Y) = 0

By @baking - 4 months
Why make it complicated? One coin flip, X = Heads and Y = Tails. P(X = Y) = 0.
By @Davidzheng - 4 months
Honestly it's fine to confuse a random variable with its distribution if you only are working with a single RV. Changing probability space without changing distribution doesn't really matter much, probability space is more of an abstraction it's not really measurable
By @tpoacher - 4 months
I've often felt that one of the reasons such warnings are even necessary, is because the notation we use to denote probabilities in the first place is atrocious, and clearly an abuse of notation.

A better convention would make clear the distinction between the set of possible outcomes, the act of obtaining a (range of) samples from that set, and the probability that those events match a value range of interest. p(x=X) is not enough to capture all that information. let alone p(x) vs p(X).

By @clircle - 4 months
Whoops, you posted the wrong page. The statistics page that Hacker News needs to read is the one about how the Central Limit Theorem doesn't apply to everything damn thing.
By @dinobones - 4 months
These types of explanations are the reason I dislike school. This is such a stuffy and contrived way to explain things.

I’m so glad I have ChatGPT now, I always ask for applied examples and ask it to explain things intuitively. I would’ve been a 4.0 student if I would’ve had ChatGPT as my personal tutor when I was in school.

By @glitchc - 4 months
This article is overly complicated. The random variable X is a function mapping the outcome to its probability. The distribution, or the probability density function, or pdf, is the integral of that function. The cumulative density function, the cdf, is in turn the integral of the pdf.