高校数学の質問スレ(医者・東大卒専用) Part438 (991レス)
高校数学の質問スレ(医者・東大卒専用) Part438 http://rio2016.5ch.net/test/read.cgi/math/1723152147/
上
下
前次
1-
新
通常表示
512バイト分割
レス栞
抽出解除
レス栞
リロード規制
です。10分ほどで解除するので、
他のブラウザ
へ避難してください。
332: 132人目の素数さん [sage] 2024/11/21(木) 18:36:44.68 ID:Ci8ztJhi 尿瓶ジジイって論破されて発狂してそれもまた論破されてダンマリ決め込んでまた復活の繰り返しだな http://rio2016.5ch.net/test/read.cgi/math/1723152147/332
555: 132人目の素数さん [sage] 2025/01/12(日) 10:55:46.68 ID:qiFin7nw 【臨床応用問題】 下記のデータから適合する分布を選びそのパラメータを算出せよ。 https://i.imgur.com/N9lQ4Qu.png 算出例 AICやBICで判定すると非負量を定義域にする分布ではWeibull分布が最良だった。 そのパラメータは shape scale 6.404264 1.551445 インフルエンザの潜伏期は形状母数k=2.0,尺度母数θ=1.0のガンマ分布(青色)に従うとする。 https://i.imgur.com/YAI1lc2.png 【臨床応用問題】 発熱外来では呼吸器症状を呈するインフルエンザと消化器症状を呈するノロウイルス感染に二分されたとする。 発熱外来で働く職員が同時に両方のウイルスに感染したときに同じ日に呼吸器症状と消化器症状が出現する確率を求めよ。 library(fitdistrplus) set.seed(2025) noro=c( runif(2,0,24), runif(2,25,28), runif(16,29,32), runif(16,33,36), runif(14,37,40), runif(2,41,44), runif(5,45,48) )/24 fit=fitdist(noro,'weibull') ; fit gofstat(fit) plot(fit) hist(noro,freq=F,main="",col=4,breaks = 'scott') fit$estimate curve(dweibull(x,shape=fit$estimate[1],scale=fit$estimate[2]),add=TRUE,lwd=2) par=fit$estimate ; par Noro=rweibull(k,shape=par[1],scale=par[2]) plotPost(Noro,freq=FALSE,main='Norovirus',col=7) curve(dweibull(x,shape=fit$estimate[1],scale=fit$estimate[2]),add=TRUE) Flu=rgamma(k,shape=2,scale=1) par(mfrow=c(3,1)) plotPost(Flu,col=4) plotPost(Noro,col=2) plotPost(Flu-Noro,col=7,compVal = 0) mean(abs(Flu-Noro) < 1) http://rio2016.5ch.net/test/read.cgi/math/1723152147/555
556: 132人目の素数さん [sage] 2025/01/13(月) 05:38:55.68 ID:cjaPfdCl https://i.imgur.com/0tg88Vd.png http://rio2016.5ch.net/test/read.cgi/math/1723152147/556
609: 132人目の素数さん [sage] 2025/01/23(木) 14:37:17.68 ID:S3e4bqGA m=j=4種類, k=5人, 1人ごとの確率は p_i=0.1i={0.1, 0.2, 0.3, 0.4} として、期待値の式を整理し Wolfram Alphaに入力するとこうなる https://www.wolframalpha.com/input?i2d=true&i=Integrate%5B%5C%2840%291-Product%5B%5C%2840%291-%5C%2840%29Power%5Be%2C%5C%2840%29-0.1*i*t%5C%2841%29%5D%5C%2841%29Sum%5B%5C%2840%29Divide%5B%5C%2840%29Power%5B%5C%2840%290.1*i*t%5C%2841%29%2Cj%5D%5C%2841%29%2C%5C%2840%29j%21%5C%2841%29%5D%5C%2841%29%2C%7Bj%2C0%2C4%7D%5D%5C%2841%29%2C%7Bi%2C1%2C4%7D%5D%5C%2841%29%2C%7Bt%2C0%2C%E2%88%9E%7D%5D 期待値の計算結果は 約51.685 …同じ問題の式を前にも書き込んだ気がする 次は中央値が知りたい、ということは シミュレーションの結果と照合したいのかな 同じ式をそのまま使うと、計算量が さらに大きくなりそう http://rio2016.5ch.net/test/read.cgi/math/1723152147/609
866: 132人目の素数さん [sage] 2025/06/05(木) 13:25:27.68 ID:tGlaBVfa > stancode(fit) // generated with brms 2.22.0 functions { /* compute monotonic effects * Args: * scale: a simplex parameter * i: index to sum over the simplex * Returns: * a scalar between 0 and rows(scale) */ real mo(vector scale, int i) { if (i == 0) { return 0; } else { return rows(scale) * sum(scale[1:i]); } } } data { int<lower=1> N; // total number of observations array[N] int Y; // response variable int<lower=1> K; // number of population-level effects matrix[N, K] X; // population-level design matrix int<lower=1> Kc; // number of population-level effects after centering int<lower=1> Ksp; // number of special effects terms int<lower=1> Imo; // number of monotonic variables array[Imo] int<lower=1> Jmo; // length of simplexes array[N] int Xmo_1; // monotonic variable vector[Jmo[1]] con_simo_1; // prior concentration of monotonic simplex int prior_only; // should the likelihood be ignored? } transformed data { matrix[N, Kc] Xc; // centered version of X without an intercept vector[Kc] means_X; // column means of X before centering for (i in 2:K) { means_X[i - 1] = mean(X[, i]); Xc[, i - 1] = X[, i] - means_X[i - 1]; } } parameters { vector[Kc] b; // regression coefficients real Intercept; // temporary intercept for centered predictors simplex[Jmo[1]] simo_1; // monotonic simplex vector[Ksp] bsp; // special effects coefficients } transformed parameters { real lprior = 0; // prior contributions to the log posterior lprior += normal_lpdf(b[1] | 0.15, 0.3); lprior += normal_lpdf(b[2] | 0.08, 0.3); lprior += normal_lpdf(b[3] | 0.8, 0.3); lprior += normal_lpdf(b[4] | 0.5, 0.3); lprior += normal_lpdf(Intercept | -4, 2); lprior += dirichlet_lpdf(simo_1 | con_simo_1); lprior += normal_lpdf(bsp[1] | -0.5, 0.3); } model { // likelihood including constants if (!prior_only) { // initialize linear predictor term vector[N] mu = rep_vector(0.0, N); mu += Intercept; for (n in 1:N) { // add more terms to the linear predictor mu[n] += (bsp[1]) * mo(simo_1, Xmo_1[n]); } target += bernoulli_logit_glm_lpmf(Y | Xc, mu, b); } // priors including constants target += lprior; } generated quantities { // actual population-level intercept real b_Intercept = Intercept - dot_product(means_X, b); } http://rio2016.5ch.net/test/read.cgi/math/1723152147/866
931: 132人目の素数さん [sage] 2025/06/22(日) 16:10:21.68 ID:AY7cZjkg >>930 そこまで非常識ではありませんよ 傑作質問が解かれないことに悲しみを覚えているだけです http://rio2016.5ch.net/test/read.cgi/math/1723152147/931
メモ帳
(0/65535文字)
上
下
前次
1-
新
書
関
写
板
覧
索
設
栞
歴
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
Google検索
Wikipedia
ぬこの手
ぬこTOP
0.043s