首页 > 其他分享 >MathProblem 34 Drug test problem

MathProblem 34 Drug test problem

时间:2022-08-15 06:00:22浏览次数:51  
标签:0.9 use 0.1 positive MathProblem times test problem

10% of the people in a certain population use an illegal drug. A drug test yields the correct result 90% of the time, whether the person uses drugs or not. A random person is forced to take the drug test and the result is positive. What is the probability he uses drugs?

Solution

利用全概率公式:

\[P(use|positive) = \frac{P(positive|use)\cdot P(use)}{P(positive|use)\cdot P(use)+P(positive|unuse)\cdot P(unuse)}\\ =\frac{0.9\times 0.1}{0.9\times 0.1+0.1\times 0.9}=\frac{1}{2} \]

标签:0.9,use,0.1,positive,MathProblem,times,test,problem
From: https://www.cnblogs.com/xinyu04/p/16586927.html

相关文章

  • MathProblem 31 Compound interest problem #1
    Whatisthevalueof$1,investedforoneyearat100%interest,compoundedinfinitely?SolutionGenerally,thevalueof$1investedfor\(n\)yearsatinteres......
  • AtCoder Beginner Contest 264部分题解(a~d)
    A题题目大意:打印“atcoder"中从第l个到第r个字母参考代码:#include<bits/stdc++.h>usingnamespacestd;#defineintlonglong#defineIOSios_base::sync_with_std......
  • CF464E The Classic Problem(线段树 最短路)
    CF464ETheClassicProblem\(\bigstar\texttt{Hint}\):发现没有什么好的突破口?为什么不想想怎样才能实现题目中\(2^x\)的加减法呢?可见每次加减法,我们要做的是将添加的......
  • 【pytest】Xdist分布式运行
    前言:平常我们手工测试用例非常多时,比如有1千条用例,假设每个用例执行需要1分钟。如果一个测试人员执行需要1000分钟才能执行完,当项目非常紧急的时候,我们会用测试人力成本......
  • Atcoder Grand Contest 025 E - Walking on a Tree(欧拉回路)
    Atcoder题面传送门打个表发现答案等于每条边被覆盖的次数与\(2\)取min之和,考虑如何构造这个上界。首先考虑树是以\(1\)为中心的菊花图,且任意\(A_i,B_i\ne1\)的......
  • pytest.ini文件配置说明
    https://www.cnblogs.com/Avicii2018/p/16391336.html 问题描述:写好test.py文件和pytest.ini文件后,报错:UnicodeDecodeError:'gbk'codeccan'tdecodebyte0xb01......
  • pytest-fixture执行顺序
    作用域-scope作用域越大,越先执行,session>package>module>class>function。是否自动调用fixture自动调用(autouse=True)优先,手动调用(autouse=False)后执行。fix_b、fix......
  • freee Programming Contest 2022(AtCoder Beginner Contest 264)A-E
    freeeProgrammingContest2022(AtCoderBeginnerContest264)https://atcoder.jp/contests/abc264FG待补A-"atcoder".substr()输出atcoder第L位和第R位上的字符#in......
  • AtCoder Beginner Contest 264
    比赛链接AtCoderBeginnerContest264E.Blackout2给出很多点(\(n+m\leq2\times10^5\)),有发电站和城市,以及很多边(\(e\leq5\times10^5\)),有\(q\)次删边操作,求每次......
  • MathProblem 29 Four dogs and a square problem
    Fourdogsoccupythefourcornersofasquarewithsideoflengtha.Atthesametimeeachdogstartswalkingatthesamespeeddirectlytowardthedogonhis......