Need help in exercise for PDFs I am watching continuous probabilities lectures (having almost no calc background) and I cannot understand solution for the following exercise:
Let $X$ be continuous random variable with a PDF of the form:
$f_X(x) = c(1-x),$ if $x \in [0,1]$ and $f_X(x) = 0 $ otherwise.
Find the following values:
1) c
Answer:
$$
\color{blue}{1 = \int_{-\infty}^\infty f_X(x) dx = \int_0^1 c(1-x)dx = c(x-x^2/2)\Big|_0^1 = c/2, \text{ and therefore, } c = 2.}
$$
Can someone help me to understand what is going on as for a person with no calc background.
I understand that we are considering the interval from 0 to 1 because this this how our PDF defined (it has zero probability outside of this interval). 
I do not understand what we do next... the process of integration and how we get c.
Thanks for help!
 A: If you don't have a calculus background, then this will (rightfully) seem like black magic.
The statement
$$\int_{-\infty}^{\infty} f_X(x)dx = 1$$
in essence tells you "the sum of all probabilities is $1$", but in a continuous way.
From the problem, you're told that the valid values of $x$ are between zero and one, so everything outside of that doesn't matter:
$$\int_0^1 f_X(x)dx = 1$$
From there, we substitute in the PDF:
$$\int_0^1 c(1-x) dx = 1$$
Now this is where calculus comes in.  The definite integral of a constant times some power of $x$, with respect to $x$, integrated from $a$ to $b$, is
$$\int_a^b nx^m dx = \frac{n}{m+1}\left[b^{m+1} - a^{m+1}\right].$$
This would be straightforward to someone who has had calculus and it's something you'll need to become familiar with to understand what's going on.
So from here we can apply this formula to your problem:
$$\int_0^1 c(1-x) dx = c(x - \frac{x^2}{2})|_0^1 = c(1 - \frac{1}{2}) = c/2 = 1.$$
The last "$=1$" is the property of the PDF; the rest of the stuff leading up to that is calculus.
A: Before getting into the calculus details, the idea behind this problem is that the integral of a PDF across its domain has to equal one.  This is because the sum of the probabilities of all possible outcomes for a random variable has to be one. That being said, we set the integral equal to one in order to solve for c.
As far as the calculus goes, the problem is using the most basic of integration rules, including the power rule ($\int x^n={x^{n+1}\over n+1}$), the sum rule ($\int f(x)+g(x)=\int f(x)+\int g(x)$), and the constant coefficient rule ($\int kf(x)=k\int f(x)$).
