Math question: How to calculate p and q for: pq^(n-1)

Superwormy

Golden Member
Feb 7, 2001
1,637
0
0

Assuming I have a set of numbers/frequency the numbers occur like this:

1 => 10
2 => 8
3 => 4
4 => etc. etc. etc.

And it's *given* that they are geometrically distributed, i.e. probability equation is:

pq^(n - 1)

How can I calculate p? (and thus q?)



Thanks!
 

TuxDave

Lifer
Oct 8, 2002
10,571
3
71
1 => 10
2 => 8
3 => 4
4 => etc. etc. etc.

So if I understand this correctly, using the first example:
1 => 10

That means for n = 1,
p*q^(n - 1) = 10/(total number of samples)

?

This sounds pretty trivial to solve. You can just take two sample points and two equations and divide them to each other to automatically remove the p term and solve for q. And then once you have q, you can solve for p.