Sum of N geometric variables with changing probability

Yoni
Messages
65
Reaction score
1

Homework Statement



Ʃ(A-i)/(N+1-i)

sum of i=1 to N

Homework Equations



How do I solve this series for all 0<N<A cases.
This series is the sum of N geometric variables of changing probability.

I'd appreciate any help
 
Physics news on Phys.org
Yoni said:

Homework Statement



Ʃ(A-i)/(N+1-i)

sum of i=1 to N

Homework Equations



How do I solve this series for all 0<N<A cases.
This series is the sum of N geometric variables of changing probability.

I'd appreciate any help

You already have an expression that is just a finite sum involving A and N. Is there something more you want? Have you tried small values such as N = 2 or N = 3?
 
Thank you for your reply.
I need an expression that is not a summation.

hmm... btw, where do you think we'd be if Johann Carl Friedrich Gauss had just said: "ohh it's a finite sum, I'll just add them all one by one" (or something like that in German)?
 
Yoni said:
Thank you for your reply.
I need an expression that is not a summation.

hmm... btw, where do you think we'd be if Johann Carl Friedrich Gauss had just said: "ohh it's a finite sum, I'll just add them all one by one" (or something like that in German)?

I was not criticizing; I was asking a question (which you answered, and then ruined by your snide comments about Gauss). Actually, the Forum rules require you to show your work, and to ask for help only when you are stuck, so I should not have replied at all. The summation is doable in terms of some non-elementary functions, and I would have been willing to help you before, but not now.
 
Last edited:
I am sorry if I offended you in any way. It was not my intent. Generally, I like to write, and sometimes it gets me into trouble. Anyway, I did not think you were criticizing me, I appreciate any help, thank you.

About showing my work, I'd be happy to. Actually I am the one writing the question, not solving it. If you wish to know, the question goes as follows:

"CookieMonster has a jar filled with 10 cookies. N of these cookies are chocolate cookies, the other are healthy cookies.
CookieMonster pulls a cookie from the jar, if it's chocolate he eats it. Otherwise he puts it back in the jar, shuffles and pulls again.
How many cookies would he pull until he eats all the chocolate cookies".

The number of cookies until each pull of chocolate cookie has a Geometric distribution:
Xi~G(p). Where p is (N-i+1)/(11-i).
For example: X1, the first pull has p=N/10. The second pull X2 has p=(N-1)/9... and so on. The total number of cookies pulled is the sum I gave above (where A is 11).

I am able to solve this easily using a computer, but I want the students to be able to solve this in class using a clue.

Thank you, and again sorry for the not-so-witty comment I made before. Didn't mean to offend anyone (not even Gauss, but I truly don't know much about him).

Yoni
 
Yoni said:
I am sorry if I offended you in any way. It was not my intent. Generally, I like to write, and sometimes it gets me into trouble. Anyway, I did not think you were criticizing me, I appreciate any help, thank you.

About showing my work, I'd be happy to. Actually I am the one writing the question, not solving it. If you wish to know, the question goes as follows:

"CookieMonster has a jar filled with 10 cookies. N of these cookies are chocolate cookies, the other are healthy cookies.
CookieMonster pulls a cookie from the jar, if it's chocolate he eats it. Otherwise he puts it back in the jar, shuffles and pulls again.
How many cookies would he pull until he eats all the chocolate cookies".

The number of cookies until each pull of chocolate cookie has a Geometric distribution:
Xi~G(p). Where p is (N-i+1)/(11-i).
For example: X1, the first pull has p=N/10. The second pull X2 has p=(N-1)/9... and so on. The total number of cookies pulled is the sum I gave above (where A is 11).

I am able to solve this easily using a computer, but I want the students to be able to solve this in class using a clue.

Thank you, and again sorry for the not-so-witty comment I made before. Didn't mean to offend anyone (not even Gauss, but I truly don't know much about him).

Yoni

Sorry: I thought you were a student wanting help with homework, but since you seem to be an instructor, that's different.

Here is what I get using Maple 11:

> S:=sum((A-i)/(N+1-i),i=1..N) assuming N::posint; <--- input

S:= (-gamma*N^2+N^2-N^2*Psi(N)+A*Psi(N)*N-gamma*N+gamma*A*N-N*Psi(N)-N+A-1)/N

That is:
S = \frac{U}{N}, \\<br /> U = -\gamma N^2 + N^2 - N^2 \Psi(N) + A N \Psi(N) - \gamma N + \gamma A N <br /> - N \Psi(N) - N + A-1,
where γ is Euler's constant and Psi(N) is the "digamma" function:
\Psi(x) = \frac{d \ln \Gamma (x) }{dx}.

Note added in editing: in fact, it is even simpler if we look at the two parts separately. Maple gives the following:
S_0 = \sum_{i=1}^N \frac{1}{N+1-i} = \Psi(N+1) + \gamma\\<br /> S_1 = \sum_{i=1}^N \frac{i}{N+1-i} = (N+1) \left( \; \Psi(N+2) - 1 + \gamma \; \right)
In order to check we can compare the summed results with these formulas for a number of N values; perfect agreement (within roundoff errors) are obtained for N = 1,2,..., 10.

So, the final result is S = A*S0 - S1.
 
Last edited:
Thank you.
These functions are too complex for the course I am giving. I will have to suffice with the sum...
But you reminded me to use Maple more often. So cheers!

Yoni
 
It's the expectation that's wanted, yes? Whether the answer is complicated depends on what form of answer you'll accept.
N cookies altogether, C chocolate.
Expected number of tries for first chocolate = N/C.
Expected number of tries for second chocolate = (N-1)/(C-1).
Expected number of tries in total =\sum_{i=0}^{C-1}\frac{N-i}{C-i} = C+\sum_{i=0}^{C-1}\frac{N-C}{C-i} = C+(N-C)\sum_{i=0}^{C-1}\frac{1}{C-i} = C+(N-C)\sum_{i=1}^{C}\frac{1}{i}
So it's easy to arrive at a form that relates it to the harmonic series. Maybe you could supply a definition of the harmonic series partial sums, Hn, and ask for the answer in terms of it.
 

Similar threads

Back
Top