HOMEWORK# 52258 李亞晟 Eercise 2. The lifetime of light bulbs follows an eponential distribution with a hazard rate of. failures per hour of use (a) Find the mean lifetime of a randomly selected light bulb. Let X denote the lifetime of light bulbs,then the hazard rate h() =.. So the survival function S() = ep{- is f() = - d S() = ep{ } ; >. d du } = ep{ }, and the p.d.f. of X X has eponential distribution with λ= E() = λ =. (b) Find the median lifetime of a randomly selected light bulb. Set S(m) = ep{ m } =.5 m = log(.5) m = - log(.5) = 3.3 median lifetime is 3.3 hours (c) What is the probability a light bulb will still function after 2, hours of use? P{X>2} = S(=2) = ep{ 2 } = e 2 =.35 Eercise 2.2 The time in days to development of a tumor for rats eposed to a carcinogen follows a Weibull distribution with α=2 and λ=.. (a) What is the probability a rat will be tumor free at 3 days? 45 days? 6 days? Let X denote the time in days to development of a tumor for rats eposed to a carcinogen, and X has Weibull distribution with α=2 and λ=.. So the p.d.f. of X is f() = 2 ep { 2 }. P{X>t} = 2 t ep { 2 } d = ep { 2 } t = ep { t2 } p{x>3} = ep { 32 } =.47 ; p{x>45} = ep { 452 } =.32 p{x>6} = ep { 62 } =.27
(b) What is the mean time to tumor? Because X has Weibull distribution with α=2 and λ=.. E(X) = ( ) 2 Γ( + 2 ) = Γ( 2 ) 2 = 28.25 (b) Find the hazard rate of the time to tumor appearance at 3 days, 45 days, and 6 days. Because S() = P{X>} = ep { 2 }, hazard rate is h() = - d d logs(). h() = h(3) = 3 =.6 ; h(45) = 45 =.9 ; h(3) = 6 =.2 5 5 5 5 (d) Find the median time to tumor. Set S(m) =ep { m2 } =.5 m 2 = - log(.5) m= log(.5) tne median time to tumor is 26.32769 days Eercise 2.3 The time to death (in days) following a kidney transplant follows a log logistic distribution with α=.5 and λ=.. (a) Find the 5,, and 5 day survival probabilities for kidney transplantation in patients. Let X denote the time to death following a kidney transplant,because X has log logistic distribution with α=.5 and λ=.,the p.d.f of X is f() =.5.5 (+..5 ) 2 The survival function S() = P{X>} =.5 u.5 (+. u.5 ) 2 du = +. u.5 = P{X>5} = S(5) = +..5 +. 5.5 =.22 P{X>} = =.9 ; P{X>5} = +..5 +. 5.5 =.52 (b) Find the median time to death following a kidney transplant. Set S(m) = +. m.5 =.5 +. m.5 = 2 m = the median time to death is 2.544 days.5 = 2.544
(c) Show that the hazard rate is initially increasing and, then, decreasing over time. Find the time at which the hazard rate changes from increasing to decreasing. Hazard rate h()= f() S() =.5.5 (+..5 ) 2 ( +..5 ) =.5.5 +..5 h () = d d.5.5 +..5 =.5.5 (.5..5 ) (+..5 ) 2 to solve h () =.5.5 (.5..5 ) =.5..5.5 = = 5 (+..5 ) 2 = 3.572 We can know if > 3.572,then h () will be negative;similarly,if < 3.572,then h () will be positive. h() is increasing if < < 3.572 ; h() is decreasing if > 3.572 And the change point is = 3.572 (d) Find the mean time to death. f() =.5.5 E() =.5.5 (+..5 ) 2 (+..5 ) 2 d let u = du =.5.5 d =.5 +..5 (+..5 ) 2 ( ) u <u<.5 E() = ( u ) du = 2.544 ( ) u.5 du = 2.544 u.5( u).5 du by beta integral E() = 2.544 u.5.5 ( u) 2.5.5 du the mean time to death is 52.2 days = 2.544 Γ(.5.5 )Γ(2.5.5 ) Γ(.5.5 +2.5.5 ) = 2.544 2.48 Eercise 2.4 A model for lifetimes, with a bathtub-shaped hazard rate, is the eponential power distribution with survival function S()=ep { ep [(λ) α ]} (a) If α=.5, show that the hazard rate has a bathtub shape and find the time at which the hazard rate changes from decreasing to increasing. h() = - d d logs() = - d d (- ep [(λ) 2]) = 2 (λ ) 2 ep [(λ) 2] h () = d d 2 (λ ) 2 ep [(λ) 2]= 4 λ 2 3 2 ep [(λ) 2] + 4 λ ep [(λ) 2]
let h () = 4 λ ep [(λ) 2] = 4 λ 2 3 2 ep [(λ) 2] = λ if > λ,then h () > h() is increasing ; if < λ,then h () < h() is decreasing the change point is = λ (b) If α= 2, show that the hazard rate of is monotone increasing. h() = - d logs() = - d (- ep d d [(λ)2 ]) = 2 λ 2 ep [(λ) 2 ] h () = d d 2 λ2 ep [(λ) 2 ] = 2 λ 2 ep[(λ) 2 ] + 4 λ 4 2 ep [(λ) 2 ] because 2 λ 2 ep[(λ) 2 ] > and 4 λ 4 2 ep [(λ) 2 ] > for all and λ, we can obtain that h () > fot all andλifα=2 h() is monotone increasing the hazard rate of is monotone increasing. Eercise 2.5 The time to death (in days) after an autologous bone marrow transplant, follows a log normal distribution with μ= 3.77 and σ = 2.84. Find (a) the mean and median times to death; Let X denote the time to death after an autologous bone marrow transplant,because, X has log normal distribution, and let X = e Y where Y~N(μ=3.77, σ=2.84) the mean is E(X) E(X) = E(e Y ) = ep {μ + 2 σ2 } = ep {3.77 + 2 2.842 } = 2.299 S() = P{X>} = P{e Y > } = P{Y>log} = P{ Y 3.77 > log 3.77 2.84 2.84 Where Z~N(,), now denoteφ(t) = P{Z<t},so S() = -Φ( log 3.77 ) 2.84 Let S(m) = -Φ( logm 3.77 ) = 2.84 2 Φ(logm 3.77 ) = logm 3.77 2.84 2 2.84 m = ep{3.77} = 23.975 the median time is 23.975 days } = P{Z > log 3.77 } 2.84 =Φ - ( 2 )= (b) the probability a individual survives, 2, and 3 days following a transplant P{X>}=S()=-Φ( log 3.77 )=.247(by check the normal distribution table) 2.84 P{X>2}=-Φ( log2 3.77 2.84 )=.54 P{X>3}=-Φ( log3 3.77 )=.3 2.84
y..2.4.6.8 (c) plot the hazard rate of the time to death and interpret the shape of this function. h()= - d d logs() = - d d where φ(. ) is p.d.f. of Z graph: log (-Φ(log 3.77)) = 2.84 2.48 φ(log 3.77 ) 2.84 Φ( log 3.77 ) 2.84 2 3 4 5 R-code: =seq(,5,.); y=ep(-((log()-3.77)/2.84)^2/2)/(sqrt(2*pi)*2.48**(-pnorm((log()-3.7 7)/2.84,,))); plot(,y,type="l",lim=c(,5),ylim=c(,.8)) h() is increasing,when >.347379,h() is decreasing. Eercise 2.8 The battery life of an internal pacemaker, in years, follows a Pareto distribution with θ= 4 and λ= 5. (a) What is the probability the battery will survive for at least years? Let X denote the battery life,because X has Pareto distribution,the p.d.f of X is given by f() = 4 5 4 5 ; > 5 P{X > } = 4 5 4 5 d = 5 4 4 =.625
(b) What is the mean time to battery failure? E(X) = 5 4 5 4 5 d = 4 5 4 4 d 5 the mean time to battery failure is 6.667 years. = 4 5 4 3 3 5 = 6.667 (c) If the battery is scheduled to be replaced at the time t, at which 99% of all batteries have yet to fail (that is, at t so that Pr (X > t) =.99), find t. P{X > t } = t 4 5 4 5 d = 5 4 4 t = 5 4 t -4 =.99 5 4 = t 4 4 t = 5 4 99 99 = 5.2579 (years) Eercise 2. A model used in the construction of life tables is a piecewise, constant hazard rate model. Here the time ais is divided into k intervals, [τi-, τi ), i =,..., k, with τ = and τk =. The hazard rate on the ith interval is a constant value, θi; that is θ < τ θ 2 τ < τ 2 h() = θ k τ k 2 < τ k { θ k τ k (a) Find the survival function for this model. For < τ S() = ep { h(u) du}=ep { h(u) du} = ep{ θ } For τ < τ 2 S() = ep { h(u) du} ep{ h(u) du} τ For τ k 2 < τ k =ep{ [θ τ + θ 2 ( τ )]} τ k 2 S() = ep { h(u) du} ep{ h(u) du} ep{ h(u) du} τ k 2 τ k 3 = ep { θ k ( τ k 2 )} ep{ θ k 2 (τ k 2 τ k 3 )} ep{ θ τ } ep{ θ } For < τ τ τ So S() = ep{ [θ τ + θ 2 ( τ )]} For τ < τ 2 ep{ [θ τ + + θ k ( τ k 2 )]} For τ k 2 < τ k { ep{ [θ τ + + θ k ( τ k )]} For τ k
(b) Find the mean residual-life function. Mean residual-life function e() = S(t) dt S() For < τ e() = ep{ θ t}dt ep{ θ } = τ ep{ θ t}dt+ S(t) dt τ ep{ θ } = ep{ θ t} τ ep{ θ } θ + S(t) dt τ ep{ θ } = ep{ τ θ }+ep{ θ } + θ ep{ θ } S(t) dt τ ep{ θ } For τ < τ 2 e() = ep{ [θ τ +θ 2 (t τ )]} dt ep{ [θ τ +θ 2 ( τ )]} = τ2 ep{ [θ τ +θ 2 (t τ )]}dt+ S(t) dt τ2 ep{ [θ τ +θ 2 ( τ )]} = ep{ [θ τ +θ 2 (t τ )]} ep{ [θ τ +θ 2 ( τ )]} θ 2 τ 2 + S(t) dt τ2 ep{ [θ τ +θ 2 ( τ )]} = ep{ [θ τ +θ 2 (τ 2 τ )]}+ep{ [θ τ +θ 2 ( τ )]}+θ 2 S(t) dt τ2 θ 2 ep{ [θ τ +θ 2 ( τ )]} For τ k 2 < τ k e() = ep{ [θ τ + +θ k (t τ k 2 )]} dt ep{ [θ τ + +θ k ( τ k 2 )]} = τ k ep{ [θ τ + +θ k (t τ k 2 )]} dt+ S(t) dt τ k ep{ [θ τ + +θ k ( τ k 2 )]} = = ep{ [θ τ + +θ k (t τ k 2 )]} ep{ [θ τ + +θ k ( τ k 2 )]} θ k τ k + S(t) dt τ k ep{ [θ τ + +θ k ( τ k 2 )]} ep{ [θ τ + +θ k (τ k τ k 2 )]} +ep{ [θ τ + +θ k ( τ k 2 )]} +θ k S(t) dt τ k θ k ep{ [θ τ + +θ k ( τ k 2 )]} { e() = ep{ τ θ }+ep{ θ } S(t) dt τ + θ ep{ θ } ep{ θ } ep{ [θ τ +θ 2 (τ 2 τ )]}+ep{ [θ τ +θ 2 ( τ )]}+θ 2 S(t) dt τ2 θ 2 ep{ [θ τ +θ 2 ( τ )]} ep{ [θ τ + +θ k (τ k τ k 2 )]} +ep{ [θ τ + +θ k ( τ k 2 )]} +θ k τ S(t) dt k θ k ep{ [θ τ + +θ k ( τ k 2 )]} ep{ [θ τ + +θ k ( τ k )]} θ k ep{ [θ τ + +θ k ( τ k )]} For < τ = θ k For τ k For τ < τ 2 For τ k 2 < τ k
(c) Find the median residual-life function. Set S(m) =.5,if τ i 2 m < τ i ;<i<k ep{ [θ τ + + θ k (m τ k 2 )]}=.5 ep{ [θ k (m τ k 2 )]} = ep{[θ τ + + θ k 2 (τ k 2 τ k 3 )]}.5 m = θ k {[θ τ + + θ k 2 (τ k 2 τ k 3 )] + log(.5)}+τ k 2 Eercise 2. In some applications, a third parameter, called a guarantee time, is included in the models discussed in this chapter. This parameter ϕ is the smallest time at which a failure could occur. The survival function of the three-parameter Weibull if < ϕ distribution is given by S() ={ ep{ λ( φ) α } if ϕ (a) Find the hazard rate and the density function of the three- parameter Weibull distribution h() = d logs() = { d αλ( φ) α because h() = f() S() f() = h() S() so f() = { αλ( φ) α ep{ λ( φ) α } if < ϕ if ϕ if < ϕ if ϕ (b) Suppose that the survival time X follows a three-parameter Weibull distribution with α =, λ =.75 and ϕ =. Find the mean and median lifetimes E(X) = ϕ αλ( φ) α ep{ λ( φ) α } d let u = - φ <u E(X) = (u + φ) αλu α ep{ λu α } du = αλu α ep{ λu α } du + φ αλu α ep{ λu α } du (by gamma integral) = λ α Γ ( + α ) + ϕ =.75 Γ( + ) + = 233.334 Set S(m) =ep{.75(m ) } =.5 m = log(.5) m = 92.42 the median lifetimes is 92.42.75 +