How Can I Calculate the Probability in a Multi-Level Box System?

In summary, the conversation discusses a system with a large number of boxes containing binary numbers and the probability of certain values occurring. The speaker also mentions a calculation involving groups of boxes and their probabilities. They then explain their doubts and ask for feedback on their approach.
  • #1
Unconscious
74
12
Good morning,
I have a system that consists of a huge number of boxes, it is not important to know how many, each containing a binary number:

ba034c3043cfb69f4dada3bdd55d537394b5ed43_3_650.png

In every cell, the probability that there is a '1' is p, so the probability that there is a '0' is equal to (1-p).
What I do is take them in groups of N and add them up. For each of these sums, I calculate the probability that it is at least M.
So:
aa390b34ccb6157cb8244f28122afbd9990f5d01_3_650.png

if I do not make errors in the reasoning, the probability p' that the generic blue box contains a number greater than M is:

## p' = \sum_{j=M}^N \binom{N}{M}p^j (1-p)^{N-j} ##

In each of the blue boxes, I insert a '1' if the threshold M has been exceeded (or equaled), otherwise '0'. For example, in the previous drawing (where N = 3) if I use M = 2:

376728bb5ba916090e4a2ba81eea593af8764d83_3_650.png


At this point I take another step, and this is where my doubts come from.
I again cover the blue boxes in groups of N, separately though:

d9791f7cd205e5959466de0a849df3dec31cf236_3_650.png

I want to calculate the probability p' that is the probability that in the generic red box there is a number greater than or equal to 1. Surely I can write it like this:

d6e1645ecc8c9b92a3658a688654e50b.png


where obviously (1-p'') is the probability that in the generic red box there is a '0'. This is the probability that in N consecutive blue boxes there is always '0'. In my opinion, I cannot simply say that
d7d0690f37c92a7c9df4e7c7f3238133.png
because it does not seem to me that the events are independent.

I thought then to 'count' all the cases in my favor, using only the elementary events corresponding to the black boxes of the first row. Since this count is not at all trivial, at least for me, I had Matlab run it, with this code:

Code:
M = 4 ;
N = 8 ;
P_in = 1e-2 ;

M_results = zeros(2^(2*N-1),2*N-1);
M_prob = zeros(2^(2*N-1),2*N-1);
for i=2:2*N
    M_results(:,i-1)=repmat([ zeros(2^(2*N-i),1) ; ones(2^(2*N-i),1) ],2^(i-2),1);
    M_prob(:,i-1)=repmat([ (1-P_in)+zeros(2^(2*N-i),1) ; P_in*ones(2^(2*N-i),1) ],2^(i-2),1);
end

Probs = prod(M_prob,2);
P = 0;

for k=1:2^(2*N-1)
bool = 1;
    for j=1:N-1
        bool = bool && sum(M_results(k,j:N+(j-1)))<M;
    end
    if (bool)
        P = P + Probs(k);
    end
end

1-P

The result provided is 0.09562, in the case where N = 8 and M = 4.
I'd be curious to know an opinion on this calculation, do you think I made a mistake or is it all correct?

If you need further clarifications, I am obviously available to provide them.

Thanks in advance.
 
Last edited:
Physics news on Phys.org
  • #2
The numbers in the blue box are correlated, indeed. If N is not too big the easiest approach is to go through all options, as you did. For larger N a Monte Carlo approach might be better.
 
  • #3
Ok, thank you.
 

Related to How Can I Calculate the Probability in a Multi-Level Box System?

What is a "Box System Probability Problem"?

A "Box System Probability Problem" is a type of mathematical problem that involves calculating the probability of an event occurring within a set of boxes or containers. This type of problem is commonly used in statistics and probability theory.

How do you solve a "Box System Probability Problem"?

To solve a "Box System Probability Problem", you need to identify the total number of boxes or containers in the system, the number of boxes that contain the desired outcome, and the number of boxes that do not contain the desired outcome. Then, you can use the formula P = desired outcomes / total outcomes to calculate the probability of the event occurring.

What are some real-life applications of "Box System Probability Problems"?

"Box System Probability Problems" can be applied to various real-life situations, such as predicting the likelihood of winning a lottery, estimating the chances of a medical treatment being successful, or determining the probability of a certain stock performing well in the stock market.

What are some common mistakes made when solving "Box System Probability Problems"?

One common mistake is not accurately identifying the total number of boxes or containers in the system. Another mistake is not considering all possible outcomes and only focusing on the desired outcome. It is also important to ensure that the boxes or containers are equally likely to contain the desired outcome.

How can "Box System Probability Problems" be made more challenging?

"Box System Probability Problems" can be made more challenging by adding more boxes or containers to the system, introducing multiple events with different probabilities, or using more complex formulas such as the binomial probability formula. Additionally, considering real-life factors such as human error or external factors can also make these problems more challenging.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
1K
Replies
0
Views
700
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
10
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
8
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
713
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
7
Views
2K
Back
Top