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 4

 
Maxim Dmitrievsky:

in the (non-mass) service sector, there isn't even a large customer base, there won't be much of an output from AI

Find a related field or technology and integrate it with AI.
 
Maxim Kuznetsov:

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

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

Just once again, I will draw the public's attention to the terms before deciding it is a good idea to study the problem:

1. the a priori probability of a particular company going bankrupt within a year does not depend on the number of companies listed

2. the probabilities are independent - going bankrupt does not change the probability of another company going bankrupt

and several subtasks: find the a priori probability of bankruptcy of the 1st company (it depends on reading the vague condition "50 of 5,000 companies went bankrupt in the US market last year"), hence the probability of bankruptcy of 1 of 10 companies taken at the beginning of the year and of 2 accordingly.

 

This was probably pure mathematical fun about spherical companies in a vacuum.

And if there is real interest, you have to assess the specific company, or at least its type and area of operation.

 
Maxim Kuznetsov:

The stock exchange is not an urn, companies come and go. The idea of balls being taken and not coming back does not fit. Think of it as balls being thrown back.

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

that's a whole other issue. There was a specific question. I answered it and confirmed it experimentally.
 
Aleksey Nikolayev:

By my estimation, your formula gives 1.002, which is a pretty good approximation. But with a portfolio of 100 shares it is almost 1.02, and with 1000 shares it is almost 1.2, which is not good at all.

The formula is not mine and it cannot give a result greater than 1.
Present the calculations - I'll find your mistake.
 
Nikolai Semko:
The formula is not mine and it cannot give a result greater than 1.

Check. The code in R:

n <- 10; k <- 0:n
sum1 <- sum(dhyper(k,50+k, 4950+n-k,n)) #  ваша формула
sum2 <-sum(dhyper(k,51, 4959,n)) #  число шариков разных цветов постоянно 
sum1; sum2

sum1=1.002, sum2=1

dhyper help

 
Nikolai Semko:
it is a different task. There was a specific question. I answered it and confirmed it experimentally.

this is exactly the task.

But you solved it supposedly by experiment (actually by simulator) - what was more convenient for you. The probabilities turned out to be dependent.

I have children who do this, they don't look for lost things where they could have been lost and possibly found, but where it is more convenient to look :-)

 
Maxim Kuznetsov:

this is exactly the task.

But you solved it with an alleged experiment (in fact, with a simulator) - what was more convenient for you. The probabilities turned out to be dependent.

I have children who do this, they don't look for lost things where they might have lost them and are likely to find them, but where it is more convenient to look :-)


It is clear that the task at hand is far from practical. But the message was clear: there were 5,000 companies, 50 went bankrupt and that the same statistics were expected in the following year under the terms of the task.

Everything about the simulator is very declarative. There is no specifics. Provide your own version or point out a particular error in my version of the simulator. What's the point of all this waffling?

I agree that simulator is a better word.

In this case we are dealing exactly with dependent probabilities.

 
Aleksey Nikolayev:

Check. The code in R:

n <- 10; k <- 0:n
sum1 <- sum(dhyper(k,50+k, 4950+n-k,n)) #  ваша формула
sum2 <-sum(dhyper(k,51, 4959,n)) #  число шариков разных цветов постоянно 
sum1; sum2

sum1=1.002, sum2=1

dhyper help

Not strong in R.

Explain the following points:

k<-0:n is a vector of quantiles. Can you give a deciphering of this concept?

the second value is the number of bankrupt companies (it should be 50), then why do you add vector k to 50?

The third value is the number of non-bankrupt companies (should be 4950). Do you have 4950-n+k ?

The fourth value is number of shares = 10. Everything seems to be OK here.

 
Aleksey Nikolayev:

Check. The code in R:

sum1=1.002, sum2=1

dhyper help

No access to R.
Please see what values R gives out with the following option:

n <- 10; k0 <- 0:n; k1 <- 1:n; k2 <- 2:n
p0 <- sum(dhyper(k0,50, 4950,n))
p1 <- sum(dhyper(k1,50, 4950,n))
p2 <- sum(dhyper(k2,50, 4950,n))
p0; p1; p2