1
$\begingroup$

I want to calculate the probabilities $P\{X < 0.5\}$ and $P\{X \leq 0.5\}$. $X$ is standard normally distributed. From what I have learned

  • density function $\text{df}(x)$ I can get $P(X = x)$ and
  • cumulative distribution function $\text{cdf}(x)$ I can get $P(X \leq x)$

Now for $P\{X < 0.5\}$, does it make sense to calculate using $P\{X < 0.5\} = \text{cdf}(x) - \text{df}(x)$?

I'm confused because when I do this in R, I get a $\text{df}(x) = 0.6914625$ and $\text{cdf}(x) = 0.3520653$. 0.3520653 appears huge to me considering that it's only the probability of X being exactly 0.5? Also, in a lot of examples I have seen $P\{X < y\}$ is calculated with $\text{cdf}(y)$ only.

Do I understand something wrong there?

$\endgroup$
  • 1
    $\begingroup$ For a continuous distribution, the probability of random variable attaining a specific value(0.5 in your case) is 0 anyway. So $P(X \leq 0.5) = P(X < 0.5) + P(X = 0.5) = P(X < 0.5) $. $\endgroup$ – rightskewed Mar 20 '15 at 0:37
  • $\begingroup$ Density is not probability. $\endgroup$ – Glen_b Mar 20 '15 at 9:43
2
$\begingroup$

Quoting Wikipedia:

In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function that describes the relative likelihood for this random variable to take on a given value. The probability of the random variable falling within a particular range of values is given by the integral of this variable’s density over that range—that is, it is given by the area under the density function but above the horizontal axis and between the lowest and greatest values of the range

For a continuous random variable, the probability that it takes a specific value is zero. So in your case:

$$ P(X=0.5) = 0 $$

The reason you can calculate $P(X < 0.5)$ by using $cdf(0.5)$ is simple: $$ P(X \leq 0.5) = P(X < 0.5) + P(X = 0.5) $$

$\endgroup$
  • $\begingroup$ so the density function calculates P(X = x) only for a discrete random variable? $\endgroup$ – golom889 Mar 20 '15 at 1:01
  • $\begingroup$ The density function is defined for continuous random variables. For discrete you have the mass function $\endgroup$ – rightskewed Mar 20 '15 at 1:25
0
$\begingroup$

@golom889 you write

density function $\text{df}(x)$ I can get $P(X = x)$

that is not true. Probability density function (PDF, denoted as $f$) tells you about the density, that is "probability per foot" rather then per unit since $P(X = x) = 0$ because in continuous case an $x$ point is infinitely small (see here for learning more on PDF).

Because of that in different places you can find cumulative distribution functions (CDF, denoted as $F$) defined not as $P(X \leq x)$ but as $P(X < x)$ since $P(X = x) = 0$ and so in practice

$$P(X < x) + P(X = x) = P(X < x) + 0 = P(X < x)$$

That means that generally $P(X < x)$ and $P(X \leq x)$ are equivalent.

Calculating $F(X) - f(x)$ does not make sens since CDF is a measure of probability and PDF of density, so CDF has values in the $[0, 1]$ range while values of PDF can exceed $1$ (again check the link I provided before). You cannot add or subtract those two because they measure two different things.

The proper way to obtain probability of $X$ in certain interval from $a$ to $b$ is to subtract values of CDF, however notice that here again you are not "precise" about $P(X = x)$:

$$ F(b) − F(a) = P(a < X < b) = P(a \leq X <b) = \\ P(a < X \leq b) = P(a \leq X \leq b) $$

(cf. Wasserman, 2004, All of Statistics, Springer)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.