To specialists in the theory of probability. I have a portfolio of 10 stocks. What is the probability that 2 of my 10 companies will go bankrupt next year? - page 2

 
Why are everyone's results a bit different? Not talking about me)
 
Maxim Dmitrievsky:
Why does everyone have slightly different results? not talking about myself )

My result:

The probability of bankruptcy is exactly 1 in 10 companies:

P1 = (50!*4950!*10!*4990!)/(49!*9!*4941!*5000!) = (50*4950*4949*4948*4947*4946*4945*4944*4943*4942*10)/(5000*4999*4998*4997*4996*4995*4994*4993*4992*4991) = 0.09150979127569519373319974384113

The probability of bankruptcy is exactly 2 out of 10 companies:

P2 = (50!*4950!*10!*4990!)/(2*48!*8!*4942!*5000!) = (49*50*4950*4949*4948*4947*4946*4945*4944*4943*9*10)/(2*5000*4999*4998*4997*4996*4995*4994*4993*4992*4991) =0.00408294394502039462124049848583


corresponds to a statistical sample:

#define  total 10000000
void OnStart() {
   int sum[total];
   MathSrand(GetTickCount());
   for (int j=0; j<total; j++) {
      sum[j]=0;
      int b[10];
      for (int i=0; i<10; i++) {
         int r=35000;
         while (r>=30000) r=rand(); // отсекаем хвост для равномерности выборки
         b[i]=r%5000;
         if (b[i]<50) sum[j]++;
      }
      ArraySort(b);
      for (int i=0; i<9; i++) if (b[i]==b[i+1]) {  // проверяем нет ли одинаковых значений, если есть - повторяем заново
            j--;
            break;
         }
   }
   int s1=0,s2=0;
   for (int j=0; j<total; j++) {
      if (sum[j]==1) s1++;
      if (sum[j]==2) s2++;
   }
   Print("Вероятность 1 банкротства - "+string(double(s1)/total)+";  Вероятность 2 банкротств -   "+string(double(s2)/total));
}
2020.01.06 03:57:12.255 TestDouble (.BrentCrud,H1)      Вероятность 1 банкротства - 0.0914794;  Вероятность 2 банкротств -   0.0040698
2020.01.06 03:57:18.957 TestDouble (.BrentCrud,H1)      Вероятность 1 банкротства - 0.0915171;  Вероятность 2 банкротств -   0.0041111
2020.01.06 03:57:24.405 TestDouble (.BrentCrud,H1)      Вероятность 1 банкротства - 0.0915069;  Вероятность 2 банкротств -   0.0040973
2020.01.06 03:57:29.343 TestDouble (.BrentCrud,H1)      Вероятность 1 банкротства - 0.0916154;  Вероятность 2 банкротств -   0.0040789
 
Nikolai Semko:

The hypergeometric probability formula must be applied here.

The probability of bankruptcy is exactly 1 in 10 companies:

P1 = (50!*4950!*10!*4990!)/(49!*9!*4941!*5000!) = (50*4950*4949*4948*4947*4946*4945*4944*4943*4942*10)/(5000*4999*4998*4997*4996*4995*4994*4993*4992*4991) =0.09150979127569519373319974384113

The probability of bankruptcy is exactly 2 out of 10 companies:

P2 = (50!*4950!*10!*4990!)/(2*48!*8!*4942!*5000!) = (49*50*4950*4949*4948*4947*4946*4945*4944*4943*9*10)/(2*5000*4999*4998*4997*4996*4995*4994*4993*4992*4991) = 0.00408294394502039462124049848583

This is precisely the case where we can take advantage of the proximity of the hypergiometric distribution to the binomial distribution. The resulting inaccuracy is much smaller than the inaccuracy associated with the approximation of the model (inequality of bankruptcy probabilities of different firms, correlation between bankruptcies, etc.).

 
igrok333:
Last year 50 out of 5,000 companies went bankrupt in the US market. So the probability of a company going bankrupt is 1/100.

I have a portfolio of 10 stocks.

What is the probability that 1 of my 10 companies will go bankrupt in a year? It's easy to calculate.
The probability of one company going bankrupt is 1/100. And we take 10 companies, so we increase the odds of the event occurring by a factor of 10.
So we get a probability: 1/100 * 10 = 1/10.

What is the probability that 2 of my 10 companies go bankrupt in one year? How do we calculate this?

And if we take 101 companies, the probability is greater than 1 ? :-)

 
Aleksey Nikolayev:

This is precisely the case where one can take advantage of the proximity of the hyper-hiometric distribution to the binomial distribution. The resulting inaccuracy is much smaller than the inaccuracy associated with the approximation of the model (inequality of bankruptcy probabilities of different firms, correlation between bankruptcies, etc.).

https://www.matburo.ru/tvart_sub.php?p=calc_gg_ball

 
Maxim Kuznetsov:

And if we take 101 companies, the probability is greater than 1 ? :-)

No, noticeably less)

exactly one: 0.3696927

at least one: 0.637628

 
Nikolai Semko:

My result:

roughly understood, thank you )

 

I am aware of that. The problem is that the total number of balls is known to be 5050, but the number of black balls is unknown, and not necessarily 51 (it could be 60).

The hypergeometric distribution can be solved, but it will be the answer in terms of the confidence interval (which is poorly understood in this forum). Therefore, it is simpler to assume that we know the probability of bankruptcy (rather than estimating it via frequency, as in reality) and solve via a binomial distribution.

 
Aleksey Nikolayev:

I am aware of that. The problem is that the total number of balls is known to be 5050, but the number of black balls is unknown, and not necessarily equal to 51 (it could be 60).

The hypergeometric distribution can be solved, but that would be the answer in terms of the confidence interval (which is not well understood in this forum). Therefore, it is easier to assume that we know the probability of bankruptcy (and not its estimate via frequency, as in reality) and solve via binomial distribution.

I don't get it. It seems to be a clear problem without ambiguities.

All the more so because the result is clearly confirmed by practice
 
Nikolai Semko:

I don't get it. It seems to be a clear task without ambiguities.

The more so, the result is clearly confirmed by practice.

the stock exchange is not an urn, companies come and go. The statement about the balls that are taken and do not return does not correspond. Think of the balls being thrown back.

figuratively: at the beginning of the year there were 50,000 companies, at the end the same, but 50 went bankrupt :-)