50 people have the same buddy probability of 97%

xiaoxiao2021-03-06  14

The last furniture is wrong, this formula is verified, and it will never be wrong again ^ _ ^.

a. 50 people possible birthday combination is 365 * 365 * 365 * ... * 365 (a total of 50).

b. 50 people have no repetition combinations from 365 * 364 * 363 * ... * 316 (a total of 50).

c. 50 people have a duplicate probability of 1 - A / B

code show as below:

#include

#include

Using namespace std;

Unsigned int N = 50;

Unsigned int m = 365;

int main ()

{

Long Double P = 1.0;

For (unsigned int = 0; i

p * = (1- (double) I / m);

P = 1-P;

Cout << p << endl;

System ("pause");

Return 0;

}

The output result is: 0.97

But unfortunately, Long Double is not accurate enough, so I change M to 3, N is changed to 0, 1, 2, 3, 4, 5 to test, results and actual

0/3 chance is 0

1/3 chance is 0

2/3 chance is 1/3

3/3 chance is 7/9

4/3 chance is 1

5/3 chance is 1

Posted on 2005-01-07 23:17 Zhou Xingxing Read (585)

Comments (12)

edit

Collect

href = "http://blog.vckbase.com/bruceteen/services/pingback.aspx" Rel = "pingback" />

comment

#

Re: 50 people have the same birthday probability of 97%

2005-01-08 04:32

Liao Qian

The probability is really high, there are 4 people in the people I know and I have one day.

#

o

2005-01-08 05:14

Purple crystal

.......

#

Re: 50 people have the same birthday probability of 97%

2005-01-08 10:11

Male

Did not consider the leap year

#

Re: 50 people have the same birthday probability of 97%

2005-01-09 10:53

Bayes

This is a classic probability question, often used to explain that your feelings are extremely unreliable. . .

I have previously calculated that 23 people can guarantee that some people have the same birthday, huh, huh! Many people didn't think!

#

Re: 50 people have the same birthday probability of 97%

2005-01-12 11:16

Ishou

The results obtained using the super precision software (no distortion after the decimal point):

0.97037357957798839991865520436840386588

#

Re: 50 people have the same birthday probability of 97%

2005-01-12 11:32

Ishou

The probability of 23 people is:

0.50729723432398540722541722833703250025

The probability of 30 people is:

0.70631624271926865995623965867730366181

The probability of 35 people is:

0.81438323887471523275939529078225043834

The probability of 41 people is:

0.90315161148173540173928850723367156802

#

Re: 50 people have the same birthday probability of 97%

2005-01-12 11:39

Ishou

The probability of 221 people is:

0.99999999999999999999999999999999999999

#

Re: 50 people have the same birthday probability of 97%

2005-01-12 13:28 Shanghai Years

Will n't so much?

#

Re: 50 people have the same birthday probability of 97%

2005-01-17 03:07

Mouse love rice online audition appreciation

I am not trust! ! ! ! ! !

#

TO mouse love rice online audition appreciation:

2005-01-17 04:49

Zhou Xingxing

In fact, the chance is much higher than this, because many people like to choose season hours.

#

Re: 50 people have the same birthday probability of 97%

2005-02-19 13:58

Sexman

Blow, blow

#

Re: 50 people have the same birthday probability of 97%

2005-02-20 18:45

Quad

> I am not trust! ! ! ! ! !

There is this question in the high school mathematics book. Isn't you graduated in high school?

#

Re: 50 people have the same birthday probability of 97%

2005-01-08 04:32

Liao Qian

The probability is really high, there are 4 people in the people I know and I have one day.

#

o

2005-01-08 05:14

Purple crystal

.......

#

Re: 50 people have the same birthday probability of 97%

2005-01-08 10:11

Male

Did not consider the leap year

#

Re: 50 people have the same birthday probability of 97%

2005-01-09 10:53

Bayes

This is a classic probability question, often used to explain that your feelings are extremely unreliable. . .

I have previously calculated that 23 people can guarantee that some people have the same birthday, huh, huh! Many people didn't think!

#

Re: 50 people have the same birthday probability of 97%

2005-01-12 11:16

Ishou

The results obtained using the super precision software (no distortion after the decimal point):

0.97037357957798839991865520436840386588

#

Re: 50 people have the same birthday probability of 97%

2005-01-12 11:32

Ishou

The probability of 23 people is:

0.50729723432398540722541722833703250025

The probability of 30 people is:

0.70631624271926865995623965867730366181

The probability of 35 people is:

0.81438323887471523275939529078225043834

The probability of 41 people is:

0.90315161148173540173928850723367156802

#

Re: 50 people have the same birthday probability of 97%

2005-01-12 11:39

Ishou

The probability of 221 people is:

0.99999999999999999999999999999999999999

#

Re: 50 people have the same birthday probability of 97%

2005-01-12 13:28

Shanghai years

Will n't so much?

#

Re: 50 people have the same birthday probability of 97%

2005-01-17 03:07

Mouse love rice online audition appreciation

I am not trust! ! ! ! ! !

#

TO mouse love rice online audition appreciation:

2005-01-17 04:49

Zhou Xingxing

In fact, the chance is much higher than this, because many people like to choose season hours.

#

Re: 50 people have the same birthday probability of 97%

2005-02-19 13:58

Sexman

Blow, blow

#

Re: 50 people have the same birthday probability of 97%

2005-02-20 18:45

Quad

> I am not trust! ! ! ! ! !

There is this question in the high school mathematics book. Isn't you graduated in high school?

转载请注明原文地址:https://www.9cbs.com/read-49155.html

New Post(0)