An exponential random variable is one that follows a Poisson point process, which is memoryless. So the fact that he had a headache 5 days ago does not change the probability that he will, or will not have a headache in the next 5 days.
For an exponential distribution,
λ=rate of occurrence=mean number of headaches per day.
probability distribution function
=pdf(x, λ ) = λ e^(- λ x)
cumulative probability distribution function,
cdf(x, λ ) = 1 - e^(- λ x)
We are given probability of having no headaches in 4 days is 0.5,
this means x=4 in
cdf(4, λ ) = 0.5, =>
1 - e^(-4 λ )=0.5
Solve for λ
λ = -log(0.5)/4 = 0.1732868 [log(x)=natural log of x]
=>
interpretation: the mean number of headaches is 0.1732868 per day.
Using the cdf, for x=5 days,
cdf(5,0.1732868)=1-e^(-0.173868*5)=0.57955
=>
interpretation: probability of having a headache in 5 days = 0.57955
Therefore
probability of NOT having a headache in 5 days is (1-0.57955)=0.42045