给定N个事件中每个事件的概率,如何确定0至N个事件发生的概率? [英] How to determine probability of 0 to N events occurring given probability of each of those N events?

查看:439
本文介绍了给定N个事件中每个事件的概率,如何确定0至N个事件发生的概率?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

第一次在这里发布,因此,如果我在某件事上犯了一个错误,请告诉我,我将很乐意修复它!

给出N个事件,每个事件都有一个单独的发生概率(从0到100%),我想确定这些事件一起发生的从0到N的概率.

例如,如果我有事件1、2、3,...,N和5(E1,E2,E3 ...,EN),其中发生特定事件的个体概率如下:

  • E1 =发生概率为30%
  • E2 =发生概率40%
  • E3 =发生概率为50%

  • ...

  • EN = x%发生的概率

我想知道有以下可能性:

  • 这些事件均未发生
  • 这些事件中有1个发生
  • 这些事件中有2个发生
  • 这些事件中有3个发生
  • ...
  • 所有这些事件都发生了

我知道发生0个事件是(1-E1)(1-E2)...(1-EN),发生所有N个事件是E1 * E2 * ... * E3.但是,我不知道如何计算其他可能性(发生1到N-1个事件).

我一直在寻找可以解决这个问题的递归算法(二项式复合分布),但是我没有找到任何能做到这一点的明确公式.想知道你们中的任何人都可以帮忙!

提前谢谢!

编辑:事件确实是独立的.

解决方案

经过大量研究并从此处的答案中获得了一些帮助,我提出了以下代码:

function [ prob_numSites ] = probability_activationSite( prob_distribution_site )

N = length(prob_distribution_site); % number of events
notProb = 1 - prob_distribution_site; % find probability of no occurrence
syms x; % create symbolic variable
prob_number = 1; % initializing prob_number to 1

for i = 1:N
    prob_number = prob_number*(prob_distribution_site(i)*x + notProb(i));
end

prob_number_polynomial = expand(prob_number); % expands the function into a polynomial
revProb_numSites = coeffs(prob_number_polynomial); % returns the coefficients of the above polynomial (ie probability of 0 to N events, where first coefficient is N events occurring, last coefficient is 0 events occurring)
prob_numSites = fliplr(revProb_numSites); % reverses order of coefficients

这将考虑发生一定数量的单个事件的概率,并返回发生事件数为0到N的概率的数组.

(答案很有帮助).

First time posting here, so if I make a mistake with something let me know and I'd be more than happy to fix it!

Given N events, each of which have an individual probability (from 0 to 100%) of occurring, I'd like to determine the probability of 0 to N of those events occurring together.

For example, if I have event 1, 2, 3,...,N and 5 (E1, E2, E3...,EN) where the individual probability of a specific event occurring is as follows:

  • E1 = 30% probability of occurring
  • E2 = 40% probability of occurring
  • E3 = 50% probability of occurring

  • ...

  • EN = x% probability of occurring

I'd like to know the probability of having:

  • none of these events occurring
  • any 1 of these events occurring
  • any 2 of these events occurring
  • any 3 of these events occurring
  • ...
  • all N of these events occurring

I understand that having 0 events occurring is (1-E1)(1-E2)...(1-EN) and that having all N events occurring is E1*E2*...*E3. However, I do not know how to calculate the other possibilities (1 to N-1 events occurring).

I have been looking for some recursive algorithm (binomial compound distribution) that could solve this but I have not found any explicit formula that does this. Wondering if any of you guys could help!

Thanks in advance!

EDIT: The events are indeed independent.

解决方案

After tons of research and some help from the answers here, I've come up with the following code:

function [ prob_numSites ] = probability_activationSite( prob_distribution_site )

N = length(prob_distribution_site); % number of events
notProb = 1 - prob_distribution_site; % find probability of no occurrence
syms x; % create symbolic variable
prob_number = 1; % initializing prob_number to 1

for i = 1:N
    prob_number = prob_number*(prob_distribution_site(i)*x + notProb(i));
end

prob_number_polynomial = expand(prob_number); % expands the function into a polynomial
revProb_numSites = coeffs(prob_number_polynomial); % returns the coefficients of the above polynomial (ie probability of 0 to N events, where first coefficient is N events occurring, last coefficient is 0 events occurring)
prob_numSites = fliplr(revProb_numSites); % reverses order of coefficients

This takes in probability of certain number of individual events occurring and returns array of the probability of 0 to N events occurring.

(This answer helped a lot).

这篇关于给定N个事件中每个事件的概率,如何确定0至N个事件发生的概率?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆