View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
joeu2004 joeu2004 is offline
external usenet poster
 
Posts: 2,059
Default Calculating probabilities

"Raul Sousa" wrote:
Thanks for your replay Max.
it could be a good idea. Unfortunately I think it is not correct.


It is correct for what Max was trying to do -- which might not be what you
need.

You told us nothing about the distribution of 1s and 0s.

So Max's approach attempts to derive the probabilities based on observed
results. Since you have 5 1s and 2 0s, we might reasonably conclude that
the probablilities are 5/7 and 2/7 respectively -- that is, until you
provide additional information.


The changes to have 1 or 0 are 50/50.


New information breeds new solutions.

But you must also tell us whether the events (1 and 0) are independent or
not.

It would help if you explained how you are generating the 1s and 0s. For
example, flipping a coin, or --(RAND()<=0.5)?


the chances that the next number is a zero are bigger
than the chances that the next number is 1.
I just dont know a formula to calculate these odds.


Assuming independent events....

If you had not generated any numbers, the chances of getting a __specific__
sequence of 7 1s and 0s followed by either a 1 or 0 would be 1/(2^8).

The chances of getting __any__ sequence of 6 1s and 2 0s is COMBIN(8,6)/2^8
(about 11%), and the chances of getting any sequence of 5 1s and 3 0s is
COMBIN(8,5)/2^8 (about 22%).

So if you had not generated any numbers, you would be correct that the
probablility of 5 1s and 3 0s is higher than 6 1s and 2 0s.

But having gotten any sequence of 5 1s and 2 0s, the probability of getting
a 1 or 0 next is still 50% each, for the very reason (assumed above) that
the choice of 1 or 0 is independent of the past.

These are difficult concepts to grasp. You should take an intro course in
probability.


----- original message -----

"Raul Sousa" wrote in message
...
Thanks for your replay Max.
it could be a good idea. Unfortunately I think it is not correct.
The changes to have 1 or 0 are 50/50. In this case there is more 1 than 0
(5Vs2). So the chances that the next number is a zero are bigger than the
chances that the next number is 1.
I just dont know a formula to calculate these odds.


"Max" wrote:

Probability that its a 1:
=COUNTIF(A2:A8,1)/COUNTA(A2:A8)

Similarly, the probability that its a zero:
=COUNTIF(A2:A8,0)/COUNTA(A2:A8)

Alternatively, since Pzero + Pone = 1
as the data comprises only zeros or 1s (in this instance)
Pzero = 1 - COUNTIF(A2:A8,1)/COUNTA(A2:A8)

any good? hit the YES below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
"Raul Sousa" wrote:
I am trying to calculate probabilities in excel but I dont really know
which
functions to use.
Lets say I have only two possible outcomes 1 and 0. So far the outcome
was
as follow:
1
0
1
0
1
1
1

Which are the odds to get 1 and to get 0?
Which formula can calculate this?