How Do You Compute the MLE for p in a Treatment Effectiveness Study?

ianrice
Messages
7
Reaction score
0

Homework Statement


1. An experiment consists of giving a sequences of patients a risky treatment until two have died, and then recording N, the number who survived. If p is the proportion killed by the treatment, then the distribution of N is:
P(N=n)=(n+1)(1-p)n p2

1)Find a general formula for the MLE for p:
2)the experiment is done in 8 hospitals and the observed values of N are 3,0,4,2,3,5,1,3. Compute the estimate for the p derived in part 1


Homework Equations


2. I know I have to start by finding a general form of ∏(ni+1)(1-p)ni p2 with ni where i goes from 1 to m.




The Attempt at a Solution


3. So I get hung up on how to handle the (ni+1) term.
 
Physics news on Phys.org
ianrice said:

Homework Statement


1. An experiment consists of giving a sequences of patients a risky treatment until two have died, and then recording N, the number who survived. If p is the proportion killed by the treatment, then the distribution of N is:
P(N=n)=(n+1)(1-p)n p2

1)Find a general formula for the MLE for p:
2)the experiment is done in 8 hospitals and the observed values of N are 3,0,4,2,3,5,1,3. Compute the estimate for the p derived in part 1


Homework Equations


2. I know I have to start by finding a general form of ∏(ni+1)(1-p)ni p2 with ni where i goes from 1 to m.




The Attempt at a Solution


3. So I get hung up on how to handle the (ni+1) term.


What is preventing you from computing P(N1=3,N2=0,N3=4,...,N8=3)?
 
Ray Vickson said:
What is preventing you from computing P(N1=3,N2=0,N3=4,...,N8=3)?

The question asks for the general form of the MLE of p. then to compute P(N1,N2...N8). I need help with the general form
 
ianrice said:

Homework Equations


2. I know I have to start by finding a general form of ∏(ni+1)(1-p)ni p2 with ni where i goes from 1 to m.

There's a typo in your post. Witness that hanging .

I suspect you meant ##\Pi_{i=1}^m (n_i+1)(1-p)^{n_i} p^2##

The Attempt at a Solution


3. So I get hung up on how to handle the (ni+1) term.

This isn't that hard. Let's start with m=1, i.e., one observation. Then that product is simply ##(n_1+1)(1-p)^{n_1}p^2##. With m=2, the product becomes ##(n_1+1)(1-p)^{n_1}p^2\,(n_2+1)(1-p)^{n_2}p^2##. Try collecting terms. You should get something of the form ##A (1-p)^B p^C##, where A, B, and C are related to the observed values. Now generalize to m observations.

Where does this reach a maximum?
 
ianrice said:
The question asks for the general form of the MLE of p. then to compute P(N1,N2...N8). I need help with the general form

Start with simple cases, by writing the formula for the likelihood function of P(n1,n2) and maybe P(n1,n2,n3). This will show you the pattern that applies as well to larger problems.
 
D H said:
There's a typo in your post. Witness that hanging .

I suspect you meant ##\Pi_{i=1}^m (n_i+1)(1-p)^{n_i} p^2##
This isn't that hard. Let's start with m=1, i.e., one observation. Then that product is simply ##(n_1+1)(1-p)^{n_1}p^2##. With m=2, the product becomes ##(n_1+1)(1-p)^{n_1}p^2\,(n_2+1)(1-p)^{n_2}p^2##. Try collecting terms. You should get something of the form ##A (1-p)^B p^C##, where A, B, and C are related to the observed values. Now generalize to m observations.

Where does this reach a maximum?



So I've collected terms for m=3 and get the following:

(n1+1)(n2+1)(n3+1)(1-p)n1(1-p)n2(1-p)n3p2p2p2

So by using your A(1-p)BpC:

I think B=∑ni
C=2n
A is where I'm still stuck. Am I missing something completely I can't seem to figure out how to reduced (n1+1)(n2+1)(n3+1)

And to find the maximum I need to set the derivative to 0 and find p the parameter the question ask for.
 
What are ##(1-p)^{n_1}(1-p)^{n_2}(1-p)^{n_3}## and ##p^2p^2p^2##? Surely you can reduce these to a simpler form!
 
D H said:
What are ##(1-p)^{n_1}(1-p)^{n_2}(1-p)^{n_3}## and ##p^2p^2p^2##? Surely you can reduce these to a simpler form!

I got those:

##(1-p)^{n_1}(1-p)^{n_2}(1-p)^{n_3}## = (1-p)∑ni

##p^2p^2p^2## = p2n
 
ianrice said:
So I've collected terms for m=3 and get the following:

(n1+1)(n2+1)(n3+1)(1-p)n1(1-p)n2(1-p)n3p2p2p2

So by using your A(1-p)BpC:

I think B=∑ni
C=2n
A is where I'm still stuck. Am I missing something completely I can't seem to figure out how to reduced (n1+1)(n2+1)(n3+1)

And to find the maximum I need to set the derivative to 0 and find p the parameter the question ask for.

Why would you care about reducing ##(n_1+1) (n_2+1) \cdots (n_m+1)##? It has no effect whatsoever on the optimal value of p. In other words, the p that maximizes f(p) is the same p that maximizes 1000*f(p) or (1/100)*f(p) or any K*f(p) for constant K.
 
  • #10
Ray Vickson said:
Why would you care about reducing ##(n_1+1) (n_2+1) \cdots (n_m+1)##? It has no effect whatsoever on the optimal value of p. In other words, the p that maximizes f(p) is the same p that maximizes 1000*f(p) or (1/100)*f(p) or any K*f(p) for constant K.

Ok right I understand. I was confused.

So am I correct with the following next steps:


L(p)= ∏(ni+1)(1-p)∑nip2n

Then in the next take is to find l(p) which is l(p)=Ln(L(p))

So I end up with:

l(p)= Ln(∏(ni+1))+∑niLn(1-p)+2n*Ln(p)


Then taking the derivative of dl(p)/dp and setting that to zer
dl(p)/dp= 0+ \frac{∑n}{1-p} +\frac{2n}{p}
 
  • #11
ianrice said:
Ok right I understand. I was confused.

So am I correct with the following next steps:


L(p)= ∏(ni+1)(1-p)∑nip2n

Then in the next take is to find l(p) which is l(p)=Ln(L(p))

So I end up with:

l(p)= Ln(∏(ni+1))+∑niLn(1-p)+2n*Ln(p)


Then taking the derivative of dl(p)/dp and setting that to zer
dl(p)/dp= 0+ \frac{∑n}{1-p} +\frac{2n}{p}

Almost OK, but ##d \ln(1-p) /dp = -1/(1-p)##, not ##+1/(1-p)##. The thing you wrote could never = 0 for any p between 0 and 1.
 
Back
Top