高校数学の質問スレ(医者・東大卒専用) Part438 (902レス)
高校数学の質問スレ(医者・東大卒専用) Part438 http://rio2016.5ch.net/test/read.cgi/math/1723152147/
上
下
前
次
1-
新
通常表示
512バイト分割
レス栞
10: 132人目の素数さん [sage] 2024/08/10(土) 18:11:26.85 ID:Ad+Fjtmh Highest Densit Intervalで [0.7,0.8]が95%CIになるベータ分布のパラメータを算出。 rm(list=ls()) par(bty='l') f2=\(p){ f1=\(x) punif(30,0,x)-p uniroot(f1, c(30,100))$root } f2=Vectorize(f2) curve(f2,0.6,0.9) f0=\(a,b) (pbeta(0.7,a,b)-0.025)^2+(pbeta(0.8,a,b)-0.975)^2 opt=optim(runif(2),\(ab) f0(ab[1],ab[2])) opt=optim(opt$par,\(ab) f0(ab[1],ab[2])) ab=opt$par curve(dbeta(x,ab[1],ab[2])) library(HDInterval) ci=hdi(qbeta,shape1=ab[1],shape2=ab[2]) f3=\(a,b){ ci95=hdi(qbeta,shape1=a,shape2=b) (ci95[1]-0.7)^2 + (ci95[2]-0.8)^2 } opt=optim(ab,\(x)f3(x[1],x[2])) opt=optim(opt$par,\(x)f3(x[1],x[2])) alpha=opt$par[1] beta=opt$par[2] hdi(qbeta,shape1=alpha,shape2=beta) curve(dbeta(x,alpha,beta)) c(alpha,beta) http://rio2016.5ch.net/test/read.cgi/math/1723152147/10
メモ帳
(0/65535文字)
上
下
前
次
1-
新
書
関
写
板
覧
索
設
栞
歴
あと 892 レスあります
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
AAサムネイル
Google検索
Wikipedia
ぬこの手
ぬこTOP
0.007s