# Probability density function

1. Dec 3, 2007

### camboguy

ok iv have been stuck on this problem for like 30 mins it says "suppose x is a continuous random variable taking values between 0 and 2 and having the probability density function below."

the graph below shows a triangle with the coordinates (0,1) (2,0)

then it ask what is the Probably P(1<= X <= 2)

iv tired doing the Pythagorean therm but guess that doesn't work, then i tried something with finding the whole triangles area but then i was stuck after that and thought that was incorrect to then i sat there and was trying to find another way but i don't know any other way.

2. Dec 3, 2007

### EnumaElish

The area under the triangle integrates (adds up) to one. That's the maximum probability anyone can get (100% certainty). It's another way of saying that with 100% probability the random variable will be between 0 and 2.

The question is asking a similar question for a narrower region; so you need to calculate the area under the triangle for that region (1 < x < 2).

See http://en.wikipedia.org/wiki/Triangle_distribution

3. Dec 4, 2007

### HallsofIvy

Staff Emeritus
You say "a triangle with coordinates (0, 1) and (2, 0)" and you say that x varies from 0 to 2, so the third vertex is at (0,0). It's easy to calculate that the area of that triangle is (1/2)(2)(1)= 1 as EnumaElish pointed out. There is no reason to use the Pythagorean theorem because you are not interested in the length of the hypotenuse. You can either write out the equation of the line from (0,1) to (2,0) or use "similar triangles" to determine the y value when x= 1. (Since x=1 is exactly 1/2 of 2, that's almost trivial.) Then you just need to find the area of the triangle with vertices (1, 0), (1, y), and (2, 0).