Graphing Probability Density Function - How to get range of Y values

357 Views Asked by At

When given a continuous random variable $X$ with a density function, for example $f(x) = .075x +.2,$ for $3 \le x \le 5$ and $0$ otherwise, how would you graph the y-values?

I am fairly sure you'll graph the $y$ values between 3 and 5 on the $x$-axis, and all other $y$ values are $0,$ but between desired values, how do I come up with the $y$-graph? Maybe this is just going right over my head.

Note: I'm also pretty the sure the range is technically infinite between 3 and 5, but how do I know where to start and stop? Not sure if I'm making sense.

1

There are 1 best solutions below

1
On

Comment: Using the curve function in R statistical software, I got the plot below.

curve((.075*x + .2)*(x > 3 & x < 5), 1, 7, n=1001, xlim=c(2,6), lwd=2, ylab="f(x)")
abline(h=0, col="green2")

enter image description here

But you should do exactly as @Paul says in his Comment. Then you should check to see that the area under the 'curve' is $1,$ as required for a density function. Can you find $P(X \le 4)?$