电源查询中的累积二项式分布

发布于 2025-01-30 08:51:00 字数 261 浏览 2 评论 0原文

我希望在电源查询中进行累积二项式分布。我拥有的数据是:

  1. 员工
  2. 审核完成的
  3. 失败审核,

我想知道审计失败率不到5%的员工是好的或幸运的。例如,如果雇员被审核20次以0次失败而被审计,则二项式分布将说,实际失败率为5%的概率为36%,因此员工可能很幸运。 示例2,对于100次审核100次失败的员工,我会计算他们有0.6%的失败率的机会为0.6%,而失败率为5%,而1.3.1%的失败的机会为3.1%或单独运气的失败更少。

I'm looking to do a cumulative binomial distribution in power query. The data I have is:

  1. Employee
  2. Audits Completed
  3. Failed Audits

I want to know the probability that an employee with less than a 5% audit failure rate is good or lucky. Example, if an employee is audited 20 times with 0 failures, a binomial distribution will say the probability of that with a 5% true failure rate is 36%, so that employee may be lucky.
Example 2, for an employee audited 100 times with 1 failure, I would calculate they have 0.6% chance of having 0 failure given a 5% failure rate, and a 3.1% chance of 1 failure, for a 3.7% cumulative chance of having 1 or fewer failures by luck alone.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦巷 2025-02-06 08:51:00

这就是我做的。

启动数据:

“启动数据”

(请注意,失败%不是员工的失败%,这是我们用于二项式计算的目标失败%)

m code:< /strong>

  #"Added Custom" = Table.AddColumn(#"Changed Type", "s-list", each List.Numbers(0,[fails]+1,1)),
    #"Expanded s-list" = Table.ExpandListColumn(#"Added Custom", "s-list"),
    #"Added Custom1" = Table.AddColumn(#"Expanded s-list", "Binomial Distribution", each Number.Factorial([audits])/(Number.Factorial([audits]-[#"s-list"])*Number.Factorial([#"s-list"]))*Number.Power([#"fail%"],[#"s-list"])*Number.Power(1-[#"fail%"],[audits]-[#"s-list"])),
    #"Grouped Rows" = Table.Group(#"Added Custom1", {"ee", "audits", "fails", "fail%", "binom"}, {{"Binomial Distribution", each List.Sum([Binomial Distribution]), type number}})

说明

第一步使用列表。编号函数以生成从0到失败总数的列表

第二步扩展,因此列表中的每个数字都在其自己的行上

第三步添加了列表中每个数字的非构造二项式概率

第四步组备份并总结二项式分布以进行累积分布

Here's how I did it.

Starting data:

starting data

(please note fail% isn't the employee's fail %, it is the target fail % we are using for the binomial calculation)

M Code:

  #"Added Custom" = Table.AddColumn(#"Changed Type", "s-list", each List.Numbers(0,[fails]+1,1)),
    #"Expanded s-list" = Table.ExpandListColumn(#"Added Custom", "s-list"),
    #"Added Custom1" = Table.AddColumn(#"Expanded s-list", "Binomial Distribution", each Number.Factorial([audits])/(Number.Factorial([audits]-[#"s-list"])*Number.Factorial([#"s-list"]))*Number.Power([#"fail%"],[#"s-list"])*Number.Power(1-[#"fail%"],[audits]-[#"s-list"])),
    #"Grouped Rows" = Table.Group(#"Added Custom1", {"ee", "audits", "fails", "fail%", "binom"}, {{"Binomial Distribution", each List.Sum([Binomial Distribution]), type number}})

Explanation

First step uses the List.Numbers function to generate a list from 0 to the total number of failures
enter image description here

Second step expands so each each number in the list is on its own row
enter image description here

Third step adds the non-cumulative binomial probability for each number in the list
enter image description here

Fourth step groups it back up and sums up the binomial distribution for a cumulative distribution
enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文