# Gamma distribution problem

Problem Statement
A certain system is based on two independent modules, A and B. A failure of any module causes a failure of the whole system. The lifetime of each module has a Gamma distribution, with parameters α λ given in the table: [COMPONENT A: α:3 λ:1] [COMPONENT B: α:2 λ:2]

a)What is the probability that the system works at least 2 years without a failure? (I already have the answer for this, which is .06195, estimated to .062)

b)Given that the system failed during the first 2 years, what is the probability that it failed due to the failure of component B (but not component A)?
Relevant Equations
gamma density $f(x) = \dfrac{(λ^α)(x^{(α-1)})(e^{(-λx)}) }{Γ(α)}$
I'm lost. First one was easy to calculate, second one is harder.

I have:

P{a fails before 2 yrs} = .323325
P{b fails before 2 yrds} = .90844

P{system doesnt fail for 2 years or longer} = .062
P{system does fail before 2 years} = .938

P{A and B fail before 2 yrs} = .29372
P{before 2 years A fails but B doesn't} = .0296
P{before 2 years A doesnt fail but B fails} = .6147

P{System failed due to B and not A | system failed during first 2 yrs} =

(.6147*.938)/.938

which = .6147 but this is not the right answer. I don't know where my logic is wrong.

Last edited:
Related Calculus and Beyond Homework News on Phys.org

#### StoneTemplePython

Gold Member
I'm lost. First one was easy to calculate, second one is harder...
Can we move this to the calculus forums and fix the LaTeX?

Gamma's.. aren't pre-calc.

As for the LaTeX, you are using $\propto$ instead of, I'm guessing, $\alpha$ which is quite confusing.

As far as your bottom statement

 $\frac{( P{before 2 years A doesnt fail but B fails} = .6147 * P{system does fail before 2 years} = .938 ) }{P{system does fail before 2 years} = .938}$
try wrapping it in "\text{}" it read as

 $\frac{( P{\text{ before 2 years A doesnt fail but B fails}} = .6147 * P{\text{ system does fail before 2 years}} = .938 ) }{P{\text{ system does fail before 2 years}} = .938}$

Can we move this to the calculus forums and fix the LaTeX?

Gamma's.. aren't pre-calc.

As for the LaTeX, you are using $\propto$ instead of, I'm guessing, $\alpha$ which is quite confusing.

As far as your bottom statement

 $\frac{( P{before 2 years A doesnt fail but B fails} = .6147 * P{system does fail before 2 years} = .938 ) }{P{system does fail before 2 years} = .938}$
try wrapping it in "\text{}" it read as

 $\frac{( P{\text{ before 2 years A doesnt fail but B fails}} = .6147 * P{\text{ system does fail before 2 years}} = .938 ) }{P{\text{ system does fail before 2 years}} = .938}$

Sorry most of my threads from this course have been in this forum so I thought it would fit.

And yes, I do mean to use 'alpha' but I had trouble finding it :/

#### StoneTemplePython

Gold Member
Sorry most of my threads from this course have been in this forum so I thought it would fit.

And yes, I do mean to use 'alpha' but I had trouble finding it :/
put a \ before "alpha" i.e. in LaTeX use $\alpha$ to get alpha... what you use was $\propto$ i.e. the symbol for proportional to, which is quie different.

You can right click my LaTeX and do "show math as -> Tex Commands" to see the underlying LaTeX

Mentor

#### StoneTemplePython

Gold Member
What background knowledge do you have on the gamma distribution? Do you know about Poisson processes?

We're dealing with positive integer values for $\alpha$ so this is that important special case called an Erlang Distribution. (Erlang comes up in queuing problems and is very natural in that if you look at a Poisson process and the density for the time until kth arrival, it is Erlang of order k...)

Supposing you understand some of the above:
Do you understand that component $A$ is the sum of $X_1 + X_2 + X_3$ and component $B$ is the sum of $Y_1 + Y_2$ where $X_i$ are iid exponential random variables with parameter $\lambda = 1$ and the $Y_i$ are iid exponential random variables with parameter $\lambda = 2$?

If so, how can you simplify the problem and use Poisson process "stuff" to get a nice easy answer?

Supposing none of that made sense:
what do you know about Gamma's and what technique has been suggested in class / in your text?

My book never mentions Erlang. I understand the third paragraph.

What I understand about Gamma distributions:

When a procedure consists of α amount of steps and each step takes an exponential amount of time λ, then the total time has a gamma distribution.

What I think I did wrong in this problem is, my logic is wrong somewhere for the conditional probability

#### StoneTemplePython

Gold Member
What I understand about Gamma distributions:

When a procedure consists of α amount of steps and each step takes an exponential amount of time λ, then the total time has a gamma distribution.
Let's use this. I'd say $\alpha$ "arrivals" not "steps" here, but I understand you. In terms of a Poisson process -- do you understand how a Poisson process can be interpreted as counting "arrivals" where each one is iid exponential with parameter $\lambda$? If so, how can you use that to tackle the problem?

Less satisfying but equivalent approach -- do you know how to get (look up?) the CDF for a Gamma distribution?

your question (a) is equivalent to
$Pr\{A \gt 2\} \cdot Pr\{B\gt 2\}$
because they are independent. How can you get this with use the use of the CDFs?

your question (b) as a first cut I'd suggest using the complement of what you compute in part (a)... i.e. 1- answer for part (a) is total probability of this happening. (This ends up in the denominator -- apply bayes rule). Can you work out in sets what this complement refers to?

then using conditioning and integration, compute the probability that $B$ and $A$ both fail before 2, but $B$ fails first. This is the tricky part. The other, easier part is $Pr\{A \gt 2\} \cdot Pr\{B\leq 2\}$ -- these two are mutually exclusive events so their probabilities add.

There should be more clever approaches... and again some poisson process ideas comes to mind.
- - - -
I am finding it rather tough to figure out how to help you here as your relevant equation is just a definition of the gamma density -- it doesn't suggest much about what you know and don't know. And your work shown is just numbers -- it isn't clear what techniques you used to arrive at them or what techniques are being pushed in your text...

Last edited:

#### Ray Vickson

Homework Helper
Dearly Missed
My book never mentions Erlang. I understand the third paragraph.

What I understand about Gamma distributions:

When a procedure consists of α amount of steps and each step takes an exponential amount of time λ, then the total time has a gamma distribution.

What I think I did wrong in this problem is, my logic is wrong somewhere for the conditional probability
An Erlang distribution is just a Gamma distribution with an integer value of $\alpha$. It is true that an Erlang random variable is the sum of $\alpha$ iid exponential ($\lambda$) random variable; usually these are referred to as stages or phases, not steps. (I have also not heard of them as being called "arrivals" when they are merely part of an a-priori Erlang, but of course they are arrivals when we refer to such things as the time of the nth arrival in a Poisson process, for example.)

Your characterization of a general Gamma (with non-integer $\alpha$) is incorrect: if $\alpha = 3.46$, how can you have 3.46 stages or arrivals or whatever you want to call them?

There is something your question does not mention: what happens after a failure? Is the component immediately replaced by an identical, but brand-new component? Or, do you just let the system sit in failed mode for the whole future? This could make a difference to probability calculations.

(1) No replacement. For $T=2$ (yrs) the probability that A fails in $(0,T)$ but B does not fail in $(0,T)$ is
$$P(\text{A fails but not B}) = P(T_A < T, T_B > T) = \int_0^T f_A(t) \, dt \int_T^\infty f_B(t) \, dt.$$

(2) Replacement after failure. The probability that A fails once and B does not fail is
$$P(\text{A once but not B}) = \sum_t P(T_{A1} = t < T, T_{A2}>T-t, T_B > T) \\ = \int_0^T \left[ f_A(t) \int_t^T f_A(s) \, ds\right] \, dt \int_T^\infty f_B(t) \, dt$$

Last edited:

Hmm I seem to have gotten the right answer now, which is .6147/.938

Ray I don't think I wrote α=3.46 anywhere mate??

#### StoneTemplePython

Gold Member
Hmm I seem to have gotten the right answer now, which is .6147/.938

Ray I don't think I wrote α=3.46 anywhere mate??
Do you mind posting your solution -- it would be a bit more satisfying for us to see the result written up.

What he's saying here with $\alpha = 3.46$ is an example... Erlangs use natural numbers for $\alpha$ and your intuition breaks for "steps" if $\alpha$ is not a natural number. So the gamma is a bit more general. The fact that squaring a standard normal gives a gamma with parameters 1/2, 1/2 seems relevant though probably a bit too far afield.

b)Given that the system failed during the first 2 years, what is the probability that it
failed due to the failure of component B (but not component A)? "

Using:
P{before 2 years A doesnt fail but B fails} = .6147

divided by:
P{system does fail before 2 years} = .938

Gives the solution, which is .6553

To calculate the first two, I used the gamma density formula on the "relevant equations" tab in the OP, with the values given in the OP for the parameters

"Gamma distribution problem"

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving