Deductible and Policy limit I'm trying to figure out the solution to the following problem. I was working with the Adapt program for the p exam but I can't find the solution anywhere. 
Problem:
Consider an insurance policy that reimburses collision damages for an insured individual. The probability that an individual has a collision is 80%. 
Given an individual has a collision, the resulting damage is denoted by X. X has the following pdf: 
f(x)=\begin{cases}
    1/100, & \text{if $100<x<200$}.\\
    0, & \text{otherwise}.
  \end{cases}
The policy has a deductible of 20 and a policy limit of 150. Calculate the median insurance disbursement. 
Attempt:
$\Large .8*\int_{20}^{170}(x-2)*\frac{1}{100}dx + 150*S_x(170)$ 
(where $S_x$ represents the survival function)
= $\large 184.5 * .8$ 
= 147.6

Just to add some details to what has already correctly explained in the previous answer. To solve this problem, we have to determine the  pdf of reimbursement amount. Let us call this amount $y$.  If I correctly interpret the data, the conditions stated in the OP imply  that:


*

*in 20% of subjects, $y=0$ (these are subjects who will not have damages);

*among the remaining 80% who will have a damage, those with damages between $100$ and $170$ dollars (i.e., 70% of the reimbursed group, and then 56% of the total initial population ) will be fully reimbursed, except for the reduction by $20$ dollars due to the deductible amount. In this subset, then $y$ is homogeneously distributed between $80$ and $150$ with probability $\frac{0.56}{70}=0.008=\frac{1}{125}$;

*among the same remaining 80% who will have a reimbursement, those with damages between $170$ and $200$  (i.e., 30% of the reimbursed group, and then 24% of the total initial population ) will  not be fully reimbursed, as they will receive a flat payment of $150$. In this subset, $y=150$ with probability $0.24$.
As a result, $y$ has the following pdf: 
f(y)=\begin{cases}
    0.20, & \text{if $y=0$}.\\
    1/125, & \text{if $80<y<150$}.\\
    0.24, & \text{if $y=150$}.\\
    0, & \text{otherwise}.
  \end{cases}
To get the median reimbursement, since an area of $0.20$ is present for $y=0$, we have to find the value $k$ that satisfies
$$\int_{80}^k \frac{1}{125}=0.30$$
This leads to 
$$ \frac{k}{125}-\frac{80}{125} =0.30$$
which directly gives $k=117.5$.
