简体   繁体   English

excel:如何将概率与“或”组合?

[英]excel: How do I combine probabilities with “or”?

I have a range B2:F2 which contains probabilities of different events, eg, 我有一个范围B2:F2 ,其中包含不同事件的概率,例如,

0.9  0.7  0.1  0  0.3

The probability of the "and" event is he product of the probabilities (assuming independence) and can be computed using product(b2:f2) . “和”事件的概率是概率的乘积(假设独立性),可以使用product(b2:f2)进行计算。

The probability of the "or" event is 1-product(1-(b2:f2)) but that results in the #VALUE! “或”事件的概率为1-product(1-(b2:f2))但结果为#VALUE! .

So, do I really need to resort to typing 1-(1-b2)*(1-c2)... explicitly? 因此,我是否真的需要求助于明确键入1-(1-b2)*(1-c2)...

You're almost there - type the formula you have already ( =1-product(1-B2:F2) ) then press Ctrl+Shift+Enter (instead of Enter) to make it an array formula. 您快到了-键入您已经拥有的公式( =1-product(1-B2:F2) ),然后按Ctrl + Shift + Enter(而不是Enter)以使其成为数组公式。

In this case the result itself is not an array, but the application of the array formula modifies the behaviour of the subtraction operator for 1-B2:F2 to apply the operation to each element of the input range. 在这种情况下,结果本身不是数组,但是数组公式的应用会修改1-B2:F2的减法运算符的行为,以将运算应用于输入范围的每个元素。

Your Product function works but it's an "array formula" that needs to be confirmed with CTRL + SHIFT + ENTER so that curly braces like { and } appear around the formula in the formula bar 您的Product函数可以工作,但是它是一个“数组公式”,需要通过CTRL + SHIFT + ENTER进行确认,以便{和}之类的花括号出现在公式栏中的公式周围

=1-PRODUCT(1-B2:F2)

....or alternatively you can add an INDEX function which means it can be normally entered, ie ....或者您可以添加一个INDEX函数,这意味着可以正常输入它,即

=1-PRODUCT(INDEX(1-B2:F2,0))

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将 IF 公式与 Excel 中的下拉列表结合使用? - How do I combine an IF formula with a dropdown in Excel? 如何将单元格的第一个字符与Excel中的另一个单元格组合? - How do I combine the first character of a cell with another cell in Excel? 如何在Excel中的特定单元格中合并列值? - How do I combine column values in a specific cell in Excel? 如何从我的 Chrome 下载中获取 Excel 个文件并将它们同时组合为 Excel 工作簿中的选项卡? - How do I take Excel files from my Chrome Downloads and simultaneously combine them as tabs in an Excel Workbook? 如何在 Microsoft excel 中组合 IF、AND 和 NOT 语句 - How do you combine IF, AND and NOT statements in Microsoft excel 输入文字时,如何在Excel中创建自动合并URL? - How do I create auto combine URLs in Excel when i input the text? 如何合并Excel工作表 - How can I combine excel sheets 如何合并Excel工作表中的数据和hadoop中Google驱动器中的文件? - How do I combine data from Excel sheet and files in my Google drive in hadoop? 如何组合 SUMIF 的 Excel 公式并在文本字符串中查找数字? - How do I combine the Excel formulas for a SUMIF and find number in text string? 如何合并以特定字母开头的 Excel 文件中的所有工作表? - How do I combine all sheets in an excel file that begin with a specific letter?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM