# Having problems with PMF, CDF and PMF.

1. Oct 13, 2008

### Peon666

I'm having a course in Probability in undergrad EE and I'm having too much difficuly understanding the concepts.

Would anyone explain to me, in SIMPLEST and DETAILED words the difference between these three i.e Cumulative Distribution Function (CDF), Probability Mass Function (PMF) and Probability Distribution Function (PDF)? I'd be highly obliged.

2. Oct 13, 2008

Every random variable, continuous or discrete (also mixed, if you discuss those) has a CDF. It allows you to calculate cumulative probability , which have the form

$$\Pr(X \le a)$$

for numbers $$a$$. We typically use upper-case letters as names for CDFS, so

$$F(a) = \Pr(X \le a)$$

A continuous random variable has a probability density function. This is a function having the following properties.

\begin{align*} f(x) & \ge 0\\ \int_{-\infty}^\infty f(x) \, dx & = 1 \end{align*}

Density functions do not yield probability themselves, but there is a link between the density function and the cdf:

$$F(x) = \int_{-\infty}^a f(x) \, dx$$

Finally, some random variables are discrete (integer valued, for example), and it is possible to calculate values like this:

$$\Pr(X = a)$$

(note the equal sign). The probability mass function is the function that gives these:

$$\Pr(X = a) = f(a)$$

For discrete random variables the link between the CDF and the mass function is

$$\Pr(X \le a) = \sum_{x_i \le a} f(x_i)$$

3. Oct 14, 2008

### stewartcs

There is one other property:

$$P(a < X < b) = \int_a^b f(x)dx = F(b) - F(a)$$

where a and b are constants.

Yes they do. The probability is simply the area under curve as given above.

CS

4. Oct 14, 2008

Density functions do not yield probability by themselves. As you pointed out, they need to be integrated to find probability. The values a density function itself returns is the ordinate on a graph, not a probability. That is a point we stress in introductory stat (math/stat) courses.
The cumulative distribution function yields probability.

5. Oct 15, 2008

### stewartcs

Good point, I missed the "themselves" part.

CS

6. Oct 15, 2008

Upon rereading my response seems harsh, and I apologize. But if I had \$1 for every time a student has confused a density with a cdf, and tried to use a value of f(x) as a probability, I would be able afford a drink or two (and possibly forget that the student missed a fundamental point ) :0-

7. Oct 15, 2008

### stewartcs

I didn't think it seemed harsh at all. You merely clarified your original statement such that your point was received. The first time it just seemed to me as if you were implying that a PDF is unable to provide a probability (even with integration).

CS

8. Dec 12, 2009

### Rib5

I'm having an issue with this too. What is the difference between PMF and CDF of a discrete function?

9. Dec 12, 2009

The PMF (Probability Mass Function) can be thought of as assigning probability to individual values of the random variable: that is, the PMF gives

$$P(X = x)$$

The CDF (Cumulative Distribution Function) gives cumulative probabilities: That is, gives

$$P(X \le x)$$

10. Dec 12, 2009

### Rib5

Ahh I'm so sorry! I actually understood the relationship between pmf and cdf. What I meant to ask was what is the difference between the pmf and pdf!

11. Dec 13, 2009

### Edwinkumar

Usually in the undergraduate level pmf associated with a discrete random variable and pdf is with continuous variable. But both can be used interchangeably ( I think ).

12. Dec 14, 2009

The pmf (mass function) is used with discrete random variables to show individual probabilities as shown before. a pdf is used with (what are known in introductory texts as) continuous distributions. as mentioned above, pdfs do not themselves give probability, their integrals do.

for both discrete and continuous distributions it is typically the case that the cumulative distribution function is indicated with a capital (uppercase) letter. So, for a discrete distribution

$$F(x) = P(X \le x) = \sum_{t \le x} f(t)$$

while for a continuous distribution

$$F(x) = P(X \le x) = \int_{-\infty}^x f(t)\, dt$$

13. Dec 14, 2009

### Rib5

Thanks for the replies! Does this mean that it is technically incorrect for my book to draw the pmf as impulses instead of just regular values (stem plot)

14. Dec 14, 2009

no - I assume that by impulses you mean a graph with vertical lines rising from each x-value. the heights of those lines should correspond to the probability attached to x.

15. Dec 14, 2009

### Rib5

No, I actually meant impulses. Arrows with a values above them, (no width but still have area). Also when I go to wikipedia they use lines (stems) instead of impulses (arrows) so I am guessing my book might have incorrectly used those.

So I am guessing that a pmf uses stems, but a pdf shouold uses impulses?

16. Dec 15, 2009

### bpet

These would be representing Dirac delta functions, a neat way of describing density of a point mass.