I am reading a very basic probability introduction. It's mostly a good text, but some small minutiae are often glazed over that someone with a more mathematical background might otherwise understand.
Given a probability mass function $f(w)$ that represents the temperatures you might encounter on a picnic: $$ f(w)= \begin{cases} \frac{w-40}{625}, & \text{if } 40 \leq w \leq 65 ;\\ \frac{90-w}{625}, & \text{if } 65 \leq w \leq 90 ;\\ 0, & \text{otherwise} \end{cases} $$
the cumulative distribution function, $F$, is defined as:
$$ F(w)=\int_{-\infty}^w f(u)dx $$ $$ = \begin{cases} 0, &\text{if } w < 40 ;\\ \frac{w^2-80w+1600}{1250}, & \text{if } 40 \leq w \leq 65 ;\\ \frac{180w-w^2-6850}{1250}, & \text{if } 65 \leq w \leq 90 ;\\ 1, & \text{otherwise} \end{cases} $$
Questions:
- What is the significance of capital $F$ for the cumulative distribution function as opposed to lower case $f$ for the probability mass function? Is that simply customary for defining a cumulative distribution function?
- Why do we need a new function, $f(u)$, for the cumulative distribution function? Earlier in the text, it was demonstrated how to find the probability that the temperature would be $\leq55.2$ by:
$$ \int_{40}^{55.2} f(w) dw = \int_{40}^{55.2} \frac{w-40}{625}dw $$ $$ =\frac{w^2-80w}{1250}\Big|_{40}^{55.2} \ $$ $$ =\frac{55.2^2-80\times55.2-40^2+80\times40}{1250} \ $$ $$ =0.185 \text{ (rounded to 3 d.p.)} \ $$ Is this not just a cumulative probability function from $-\infty$ to $55.2$? If so, then why is a new cumulative probability defined as above?
- How did the author calculate the cumulative probability function? I understand how:
$$ \int_{40}^{55.2} f(w) dw = \frac{w^2-80w}{1250}\Big|_{40}^{55.2} $$ but where does:
$$ \frac{w^2-80w+1600}{1250} $$ come from?
Reference:
Tilman M. Davies. 2015. The Book of R: A First Course in Programming and Statistics (1st ed.). No Starch Press, San Francisco, CA, USA.
Edit:
I can arrive by hand at $$ \int\frac{w-40}{625}dw = \frac{w^2-80w}{1250} + C $$ and $$ \int\frac{90-w}{625}dw = \frac{180w-w^2}{1250} + K $$
Where does the $1600$ and the $6850$ in the numerators of the two functions below come from?
$$ \frac{w^2-80w + 1600}{1250}\text{if }40\leq w \leq 65; $$ and $$ \frac{180w-w^2-6850}{1250}\text{if }65 < w \leq 90; $$
I'm sorry that I am also asking for a quick explanation on some basic integral math.
Partial: I will only answer how they got $F(w)$ for $40 \leq w \leq 65$. $F(w)=\int_{40}^{w} f(u) du =\int_{40}^{w} \frac {u-40} {625}du =(\{u^{2}/2 -40u\}_{u=w} - \{u^{2} /2-40u\}_{u=40})/625$ =$\frac {w^{2}-80w-2(40^{2}/2-1600)} {1250}$=$\frac {w^{2}-80w+1600} {1250}$