[Math] How to calculate the probability distribution function (PDF)

probabilityprobability distributionsrandom variables

Sorry for the dumb question, I've been struggling with understanding the probability distribution function formula, what does "x" and "d" stand for in the formula enter image description here
, and how to use the formula? I've searched for many sample problems and answers but just couldn't get how did they reach the results, as none gives any step-by-step solutions and instead gives the straight results. Could you show me a detailed process to solve a sample question to help me understand how to use this formula?
Thank you so much!!!

Best Answer

Glad to help you get out of notation heck.

First, you may be puzzled about what $f_X(x)$ means. It is just the writer's way of saying "the probability distribution function for the random variable $X$, evaluated when $X$ is $x$. Let's give an easy example:

Say that $X$ has a range of $0$ to $1$ and on that range, the pdf is $2x$. That is, it is very unlikely that $x$ will be near to zero, where the pdf is very small, and the most likely values will be near to $1$. In that case, we would say that $$f_x(x) = 2x$$

Now for the "d" in the formula -- actually, that is part of a math notation $dx$ which stands for a very tiny change in $x$. If you have had some calculus experience, you will be familiar with notations like $$ \int_a^b x^2 \, dx = \frac13 (b^3 - a^3)$$ If you have not had any differential calculus experience, you won't understand the notations used when talking about pdf's or cumulative distribution functions.

Finally, let's try to understand the whole equation. It says that the probability that the variate $X$ is between $b$ and $a$ is given (in our example) by $$ \int_a^b 2x \, dx $$ where that $2x$ is the pdf or $X$ at the point $x$.

This integral turns out to have value $$\int_a^b 2x \, dx = (b^2-a^2)$$

And you can see that the probability that $0 \leq X \leq 1$ is $1^2 - 0^2 = 1$ which is comforting -- we knew $X$ had to be in that range. What we can learn from this is that not every possible function is usable as a pdf; if we had chosen $f_X(x) = 3x$ instead, the "normalization" would be wrong, and that comforting property would not hold true.

As a meatier exercise, what would the probability that $X \leq \frac12$ be? Well, $$\left( \frac12 \right)^2 - 0^2 = \frac{1}{4}$$