[過去ログ]
数学 統計に詳しい人が語るコロナウイルス (1002レス)
数学 統計に詳しい人が語るコロナウイルス http://rio2016.5ch.net/test/read.cgi/math/1582910321/
上
下
前
次
1-
新
通常表示
512バイト分割
レス栞
このスレッドは過去ログ倉庫に格納されています。
次スレ検索
歴削→次スレ
栞削→次スレ
過去ログメニュー
751: 132人目の素数さん [sage] 2020/07/05(日) 20:02:50.90 ID:rpUuAKzr >>750 バグに気づいたので撤回。 infectee==10ではなくてinfector+infectee==10だな。 デバッグ版 R=0.58 # mean of reproductive number k=0.45 # dispersion parameter (prob = k/(k+R)) # its probability Rt=rnbinom(1e5,k,mu=R) # random numbers of negative binomial distribution hist(Rt,breaks = 'scott',freq=F,ann=F) # show its histgram sim <- function(n=10){ # simulation infected=0 # initial value while(infected!=n){ # while infected is unequal to n infector=sample(n,1) # prior discrete uniform distribution of infector number infectee=sum(sample(Rt,infector)) # number of infectee infected=infectee+infector # number of infected } return(infector) # when n infected, return infector number } spreader=replicate(1e5,sim()) # simulation & calculation hist(spreader,freq=F,ylab='',axes=F,breaks='scott') ; axis(1) HDInterval::hdi(spreader)[1:2] # 95% credibility interval BEST::plotPost(spreader) # graph with 95%CI & mean summary(spreader) sum(spreader==1)/length(spreader) # the probability of single super-spreader まあ、パーティー中に感染させる人数に再生産数を流用していいかは疑問ではあるが、 実効結果は https://i.imgur.com/ApDSW1J.png 95% CI > HDInterval::hdi(spreader)[1:2] # 95% credibility interval lower upper 3 9 中央値、平均値、四分位値 > summary(spreader) Min. 1st Qu. Median Mean 3rd Qu. Max. 1.000 6.000 7.000 6.844 8.000 10.000 1人のスーパースプレッダーの確率 > sum(spreader==1)/length(spreader) # the probability of single super-spreader [1] 0.00104 http://rio2016.5ch.net/test/read.cgi/math/1582910321/751
メモ帳
(0/65535文字)
上
下
前
次
1-
新
書
関
写
板
覧
索
設
栞
歴
あと 251 レスあります
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
AAサムネイル
Google検索
Wikipedia
ぬこの手
ぬこTOP
0.013s