概率论中的独立性---P(B)、P(B|A)、P(AB)联系与区别

定义:

若A、B两个事件满足:
P ( A B ) = P ( A ) P ( B ) P(AB)=P(A)P(B) P(AB)=P(A)P(B)
则A、B相互独立。

注意:
P ( B ∣ A ) P(B|A) P(BA)是指A发生的条件下,B发生的概率; P ( B ) P(B) P(B)为B发生的概率,此二者是否相等?
如果 P ( B ∣ A ) = P ( B ) P(B|A)=P(B) P(BA)=P(B),则表明事件A对B无影响,即A和B是相互独立的。

例:抛硬币2次,设A为第一次出现正面,B为第二次出现正面的事件,则:
P ( A ) = 1 2 P(A)=\frac{1}{2} P(A)=21
P ( B ) = 1 2 P(B)=\frac{1}{2} P(B)=21
P ( A B ) = 1 2 × 1 2 = 1 4 P(AB)=\frac{1}{2}\times\frac{1}{2}=\frac{1}{4} P(AB)=21×21=41(第一第二次都为正面的概率)
条件概率公式
P ( A ∣ B ) = P ( A B ) P ( B ) P(A|B)=\frac{P(AB)}{P(B)} P(AB)=P(B)P(AB)
得:
P ( A ∣ B ) = P ( A B ) P ( B ) = 1 4 1 2 = 1 2 P(A|B)=\frac{P(AB)}{P(B)}=\frac{\frac{1}{4}}{\frac{1}{2}}=\frac{1}{2} P(AB)=P(B)P(AB)=2141=21
因为 P ( A ∣ B ) = P ( A ) P(A|B)=P(A) P(AB)=P(A),即在B发生的前提下A发生的概率等于A发生的概率,所以B对A没影响,也就是B与A没关系,相互独立。

总结: P ( A ∣ B ) P(A|B) P(AB) P ( A B ) P(AB) P(AB)的公式不一样,不要搞混,公式见上文。

  • 5
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
apache benchmark 独立文件 ab.exe 可以直接使用 Version 2.3。一般用户压力测试用。参数如下 .\ab.exe --help Options are: -n requests Number of requests to perform -c concurrency Number of multiple requests to make at a time -t timelimit Seconds to max. to spend on benchmarking This implies -n 50000 -s timeout Seconds to max. wait for each response Default is 30 seconds -b windowsize Size of TCP send/receive buffer, in bytes -B address Address to bind to when making outgoing connections -p postfile File containing data to POST. Remember also to set -T -u putfile File containing data to PUT. Remember also to set -T -T content-type Content-type header to use for POST/PUT data, eg. 'application/x-www-form-urlencoded' Default is 'text/plain' -v verbosity How much troubleshooting info to print -w Print out results in HTML tables -i Use HEAD instead of GET -x attributes String to insert as table attributes -y attributes String to insert as tr attributes -z attributes String to insert as td or th attributes -C attribute Add cookie, eg. 'Apache=1234'. (repeatable) -H attribute Add Arbitrary header line, eg. 'Accept-Encoding: gzip' Inserted after all normal header lines. (repeatable) -A attribute Add Basic WWW Authentication, the attributes are a colon separated username and password. -P attribute Add Basic Proxy Authentication, the attributes are a colon separated username and password. -X proxy:port Proxyserver and port number to use -V Print version number and exit -k Use HTTP KeepAlive feature -d Do not show percentiles served table. -S Do not show confidence estimators and warnings. -q Do not show progress when doing more than 150 requests -l Accept variable document length (use this for dynamic pages) -g filename Output collected data to gnuplot format file. -e filename Output CSV file with percentages served -r Don't exit on socket receive errors. -m method Method name -h Display usage information (this message)

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值