Re: For absolute beginners
- From: "\"Luis A. Afonso\"" <licas_@xxxxxxxxxxx>
- Date: Tue, 25 Jul 2006 20:38:56 EDT
Jack
DO NOT TELL ME !
The probability any match out of 50 (there is an error : I thought firstly on this value, but in fact I wrote 100)
Please check for 50.
Your formula is WRONG
******p = 1 - Prod(1-(j-1)/365)*******
a) probability to have any match:
_p(any match) = (365/365)* (364/365)*...
_______... * (365-(50-1))/365
AND NOT THE FORMULA YOU WROTE.
(see Feller)
___p(at least 1 match) = 1 - p(any match)
b) match my birthday
___p(no April 25th ) = (364/365)^50 = 0.8718
___p(at least ONE April 25th ) = 1 - 0.8718
___ licas (Luis A. Afonso)
REM "TWWO"
CLS
DEFDBL A-Z
n = 50: p = 1
FOR i = 0 TO n - 1
p = p * (365 - i) / 365
NEXT i
pp = 1 - p
PRINT pp
p = 1 - (364 / 365) ^ n
PRINT p
END
.
- Follow-Ups:
- Re: For absolute beginners
- From: Jack Tomsky
- Re: For absolute beginners
- From: yurra
- Re: For absolute beginners
- References:
- For absolute beginners
- From: \"Luis A. Afonso\"
- For absolute beginners
- Prev by Date: Interview Questions
- Next by Date: Re: For absolute beginners
- Previous by thread: Re: For absolute beginners
- Next by thread: Re: For absolute beginners
- Index(es):
Relevant Pages
|