[過去ログ]
臨床統計もおもしろいですよ、その2 (1002レス)
臨床統計もおもしろいですよ、その2 http://egg.5ch.net/test/read.cgi/hosp/1540905566/
上
下
前
次
1-
新
通常表示
512バイト分割
レス栞
このスレッドは過去ログ倉庫に格納されています。
次スレ検索
歴削→次スレ
栞削→次スレ
過去ログメニュー
349: 卵の名無しさん [] 2018/11/26(月) 19:10:20 ID:WZnn9Mtx Last but not least, three laws of Do-Teihen(lowest-tier) Medical School, currently called Gachi'Ura by its graduates. It is not the bottom medical school but its enrollee that is despicable, which deserves to be called a bona fide moron beyond redemption. The graduates of Do-Teihen are so ashamed that none of them dare to mention their own alma mater they had gone through. The Do-Teihen graduates are so ashamed of having bought their way into the exclusively lowest-tier medical school that they tend to call a genuine doctor a charlatan who elucidates their imbecility. http://egg.5ch.net/test/read.cgi/hosp/1540905566/349
350: 卵の名無しさん [sage] 2018/11/26(月) 20:45:26 ID:G0yfFsA6 >>348 1時間に4本の4番線にも拡大できるようにプログラムを一般化。 densha <- function(init,Print=FALSE){ init=c(0,init) J=length(init) if(any(init*(1:J)>60)|any(init<0)) return(60) H=list() for(i in 1:J){ H[[i]]=init[i]+60/i*(0:(i-1)) } tt=sort(unlist(H)) tt=c(tt,tt[1]+60) d=diff(tt) w=sum(d^2/2)/sum(d) if(Print){ print(H) cat(sum(d^2/2),'/',sum(d),'\n') } return(w) } densha(c(15,10),P=T) optim(par=c(10,10,10),densha,method='BFGS') densha(c(15,10,7.5),P=T) http://egg.5ch.net/test/read.cgi/hosp/1540905566/350
351: 卵の名無しさん [sage] 2018/11/27(火) 08:33:47 ID:WzO5TT32 Pn(t)=rho^n/n!P0(t) ,1<=n<=s Pn(t)=rho^n/s!s^(n-s)P0(t) , n>=s P0(t)= 1/{sigma[n=0,n=s]rho^m/n! + rho^(s+1)/(s!(s-rho))} http://www.geocities.co.jp/Technopolis-Mars/5427/math/sw_waitque5.html http://egg.5ch.net/test/read.cgi/hosp/1540905566/351
352: 卵の名無しさん [sage] 2018/11/27(火) 08:48:31 ID:WzO5TT32 Pn(t)=rho^n/n!P0(t) ,1<=n<=s Pn(t)=rho^n/(s!s^(n-s))P0(t) , n>=s P0(t)= 1/{sigma[n=0,n=s]rho^n/n! + rho^(s+1)/(s!(s-rho))} http://www.geocities.co.jp/Technopolis-Mars/5427/math/sw_waitque5.html MMS = function(t, n, lamda,mu,s){ rho=lamda/mu sig=0 for(i in 0:n) sig=sig+rho^i/factorial(i) p0t=1/( sig + rho^(s+1)/factorial(s)/(s-rho) ) ifelse(n >= s, rho^n/factorial(s)/s^(n-s)*p0t, rho^n/factorial(n)*p0t) } http://egg.5ch.net/test/read.cgi/hosp/1540905566/352
353: 卵の名無しさん [sage] 2018/11/27(火) 09:47:23 ID:WzO5TT32 MMS = function(n, lamda=1/20,mu=1/10,s=3){ rho=lamda/mu sig=0 for(i in 0:s) sig=sig+rho^i/factorial(i) p0=1/( sig + rho^(s+1)/factorial(s)/(s-rho) ) ifelse(n >= s, rho^n/factorial(s)/s^(n-s)*p0, rho^n/factorial(n)*p0) } 1-sum(sapply(0:3,MMS)) http://egg.5ch.net/test/read.cgi/hosp/1540905566/353
354: 卵の名無しさん [sage] 2018/11/27(火) 09:48:36 ID:WzO5TT32 演習問題  問題  電話回線のチケット予約システムがあり、その窓口数は3であ る  予約の電話は平均して20秒に1回  窓口は1件あたり10秒必要  予約時3つの窓口がすべて応対中であれば話中になる  このシステム全体を損失系M/M/3とみなせるとする このとき、  話中である確率を求めなさい  話中となる確率を1%未満とするには、窓口はいくつ必要です か? http://egg.5ch.net/test/read.cgi/hosp/1540905566/354
355: 卵の名無しさん [sage] 2018/11/27(火) 09:56:32 ID:WzO5TT32 >>354 MMS = function(n, lamda=1/20,mu=1/10,s=3){ rho=s*lamda/mu sig=0 for(i in 0:s) sig=sig+rho^i/factorial(i) p0=1/( sig + rho^(s+1)/factorial(s)/(s-rho) ) ifelse(n >= s, rho^n/factorial(s)/s^(n-s)*p0, rho^n/factorial(n)*p0) } 1-sum(sapply(0:3,MMS)) http://egg.5ch.net/test/read.cgi/hosp/1540905566/355
356: 卵の名無しさん [sage] 2018/11/27(火) 09:57:04 ID:WzO5TT32 MMS = function(n, lamda=1/20,mu=1/10,s=3){ rho=s*lamda/mu sig=0 for(i in 0:s) sig=sig+rho^i/factorial(i) p0=1/( sig + rho^(s+1)/factorial(s)/(s-rho) ) ifelse(n >= s, rho^n/factorial(s)/s^(n-s)*p0, rho^n/factorial(n)*p0) } 1-sum(sapply(0:3,MMS)) http://egg.5ch.net/test/read.cgi/hosp/1540905566/356
357: 卵の名無しさん [sage] 2018/11/27(火) 09:59:56 ID:WzO5TT32 MMS = function(n, λ=1/20,μ=1/10,s=3){ ρ=s*λ/μ sig=0 for(i in 0:s) sig=sig+ρ^i/factorial(i) p0=1/( sig + ρ^(s+1)/factorial(s)/(s-ρ) ) ifelse(n >= s, ρ^n/factorial(s)/s^(n-s)*p0, ρ^n/factorial(n)*p0) } 1-sum(sapply(0:3,MMS)) http://egg.5ch.net/test/read.cgi/hosp/1540905566/357
358: 卵の名無しさん [sage] 2018/11/27(火) 10:36:18 ID:WzO5TT32 MMS = function(n, λ=1/20,μ=1/10,s=3){ ρ=λ/μ sig=0 for(i in 0:s) sig=sig+ρ^i/factorial(i) p0=1/( sig + ρ^(s+1)/factorial(s)/(s-ρ) ) ifelse(n >= s, ρ^n/factorial(s)/s^(n-s)*p0, ρ^n/factorial(n)*p0) } http://egg.5ch.net/test/read.cgi/hosp/1540905566/358
359: 卵の名無しさん [sage] 2018/11/27(火) 11:23:34 ID:WzO5TT32 draft .lambda=1/20 .mu=1/10 .s=1 MMS = function(n, lambda=.lambda ,mu=.mu,s=.s){ rho=lambda/mu sig=0 for(i in 0:s) sig=sig+rho^i/factorial(i) p0=1/( sig + rho^(s+1)/factorial(s)/(s-rho) ) ifelse(n >= s, rho^n/factorial(s)/s^(n-s)*p0, rho^n/factorial(n)*p0) } now8=function(x){ p=0 for(i in 0:x) p=p+MMS(i,s=x) } 1-now8(1) E=0 for(i in 0:1e4) E=E+i*MMS(i) E*(1/.mu) n=(1:10)[which.max(sapply(1:10,now8)>0.9)] now8(n) http://egg.5ch.net/test/read.cgi/hosp/1540905566/359
360: 卵の名無しさん [sage] 2018/11/27(火) 12:44:46 ID:RTIAbEXI ”お待たせしません”を謳い文句にした真面耶馬医院で 患者の来院は平均して20分に1人、診療は1人あたり10分とする。 診察医は一人。 謳い文句に反して患者が待たされる確率は? 患者の平均待ち時間は? 待たされる確率を10%以下にするには何人の医師が必要か? 待ち時間を3分以下にするには何人の医師が必要か? lambda=1/20;mu=1/10 MMS = function(n, lambda ,mu, s){ rho=lambda/mu # rho < s sig=0 for(i in 0:s) sig=sig+rho^i/factorial(i) p0=1/( sig + rho^(s+1)/factorial(s)/(s-rho) ) # Pn : probability of n guests in system Pn=ifelse(n >= s, rho^n/factorial(s)/s^(n-s)*p0, rho^n/factorial(n)*p0) Ps=rho^s/factorial(s)*p0 L=rho + Ps*s*rho/(s-rho)^2 # guests in system Lq=Ps*s*rho/(s-rho)^2 # guests in que Wq=Lq/lambda # waiting time in que c(`Pn(t)`=Pn,L=L,Lq=Lq,Wq=Wq) } # No Wait Probability when s=x nwp=function(x,lambda,mu){ p=0 for(i in 0:x) p=p+MMS(i,lambda,mu,s=x) p } nwp(1,lambda,mu) nwp(2,lambda,mu) http://egg.5ch.net/test/read.cgi/hosp/1540905566/360
361: 卵の名無しさん [sage] 2018/11/27(火) 13:05:37 ID:RTIAbEXI 問題(第1種情報処理技術者試験・平成元年度春期午前問17を改題) ある医院では、患者が平均10分間隔でポアソン到着にしたがって訪ねてくることがわかった。 医者は1人であり、1人の患者の診断及び処方にかかる時間は平均8分の指数分布であった。 設問1 患者が待ち始めてから、診断を受け始めるまでの「平均待ち時間」を求めなさい。 設問2 待っている患者の平均人数を求めなさい。 設問3 患者の「平均待ち時間」が60分となるような平均到着間隔は約何分か?秒単位を 切り捨てた値を答えなさい。 これに 設問4 「平均待ち時間」を10分以下にするには同じ診察効率の医師が何人に必要か? http://egg.5ch.net/test/read.cgi/hosp/1540905566/361
362: 卵の名無しさん [sage] 2018/11/27(火) 13:53:38 ID:RTIAbEXI # ある医院では、患者が平均10分間隔でポアソン到着にしたがって訪ねてくることがわかった。 # 医者は1人であり、1人の患者の診療にかかる時間は平均8分の指数分布であった。 # 「平均待ち時間」を5分以下にするには同じ診察効率の医師が何人に必要か? # その最小人数で「平均待ち時間」を5分以下に保って診療するには1時間に何人まで受付可能か? sapply(1:3,function(x) MMS(0,1/10,1/8,x)['Wq']) MMS(0,1/10,1/8,s=2) f= function(l) MMS(0,l,mu=1/8,s=2)['Wq'] v=Vectorize(f) curve(v(x),bty='l',0,2/8) # rho=l/m < s , l < s*m abline(h=5,lty=3) 60*uniroot(function(x)v(x)-5,c(0.1,0.2))$root MMS(0,9.3/60,mu=1/8,s=2) http://egg.5ch.net/test/read.cgi/hosp/1540905566/362
363: 卵の名無しさん [sage] 2018/11/27(火) 15:40:44 ID:RTIAbEXI # M/M/S(s) MMSs <- function(n,lambda,mu,s){ if(n > s) return(0) rho=lambda/mu # rho < s sig=0 for(i in 0:s) sig=sig+rho^i/factorial(i) Pn=rho^n/factorial(n)/sig return(Pn) } s=3 sapply(0:s,function(x) MMSs(x,1/20,1/10,s)) cnvg=function(x,lambda,mu) MMSs(x,lambda,mu,x) # 輻輳 convergence vc=Vectorize(function(x) cnvg(x,10/60,1/30)) (1:10)[vc(1:10) < 0.05] http://egg.5ch.net/test/read.cgi/hosp/1540905566/363
364: 卵の名無しさん [] 2018/11/27(火) 18:51:54 ID:sOmaXwxS It is common knowledge among doctors and patients that Do-Teihen(exclusively bottom-leveled medical school) graduates mean morons who bought their way to Gachi'Ura(currently called by themselves) According to the experience of entrance exam to medical school in the era of Showa, when the sense of discrimination against privately-founded medical schools were more intense than it is now, all such schools but for Keio had been so compared to some specialized institution for educable mentally retarded kids that nobody but imbecile successors of physicians in private practice had applied for admission. There had been NOT a single classmate who chose willingly against his/her common sense to go to the Do-Teihen(exclusively bottom-leveled medical school, currently also known as Gachi'Ura), which would have cost outrageous money and its graduates are destined to be called Uraguchi morons who bought thier way into the Do-Teihen, by thier colleagues and even by thier own clients. Although people won't call them names to their face, certain 80-90% people of about my age have been yet scorning and sneering at Uraguchi graduates, speaking in the back of our mind, " Uraguchi morons shall not behave like somebody." We never speak out face to face in real life. http://egg.5ch.net/test/read.cgi/hosp/1540905566/364
365: 卵の名無しさん [sage] 2018/11/27(火) 20:30:45 ID:RTIAbEXI mms <- function(n,lambda,mu,s,t=0,Print=TRUE){ alpha=lambda/mu rho=lambda/s/mu # alpha=s*rho sig0=0 for(i in 0:(s-1)) sig0=sig0+alpha^i/factorial(i) P0=1/( sig0 + alpha^s/factorial(s-1)/(s-alpha) ) Pn=ifelse(n >= s, alpha^n/factorial(s)/s^(n-s)*P0, alpha^n/factorial(n)*P0) Lq=lambda*mu*alpha^s/factorial(s-1)/(s*mu-lambda)^2*P0 L=Lq+alpha Wq=Lq/lambda #=mu*alpha^s/factorial(s-1)/(s*mu-lambda)^2*P0 W=Wq+1/mu Pc=mu*P0*alpha^s/factorial(s-1)/(s*mu-lambda) #=s^s*P0/factorial(s)*rho^s/(1-rho) PTt=Pc*exp(-(1-rho)*s*mu*t) output=c(P0=P0,Pn=Pn,Lq=Lq,L=L,Wq=Wq,W=W,Pc=Pc,PTt=PTt) # P0:0 in system, Pn:n in system, Lq:guests in que, Wq: waiting time in que # L:quests in system, W:total waiting time, Pc:all windows occupied, # P: waiting time in que greater than t if(Print) print(output,digits=3) invisible(output) } mms(n=0,lambda=1/60,mu=1/10,s=1,t=0) http://egg.5ch.net/test/read.cgi/hosp/1540905566/365
366: 卵の名無しさん [] 2018/11/27(火) 20:40:29 ID:2tUinJG4 It is common knowledge among doctors and patients that Do-Teihen(exclusively bottom-leveled medical school) graduates mean morons who bought their way to Gachi'Ura(currently called by themselves) According to the experience of entrance exam to medical school in the era of Showa, when the sense of discrimination against privately-founded medical schools were more intense than it is now, all such schools but for Keio had been so compared to some specialized institution for educable mentally retarded kids that nobody but imbecile successors of physicians in private practice had applied for admission. There had been NOT a single classmate who chose willingly against his/her common sense to go to the Do-Teihen(exclusively bottom-leveled medical school, currently also known as Gachi'Ura), which would have cost outrageous money and its graduates are destined to be called Uraguchi morons who bought thier way into the Do-Teihen, by thier colleagues and even by thier own clients. Although people won't call them names to their face, certain 80-90% people of about my age have been yet scorning and sneering at Uraguchi graduates, speaking in the back of our mind, " Uraguchi morons shall not behave like somebody." We never speak out face to face in real life. http://egg.5ch.net/test/read.cgi/hosp/1540905566/366
367: 卵の名無しさん [sage] 2018/11/27(火) 21:06:39 ID:RTIAbEXI レジが1台ある。客の到着が1時間あたり平均12人であり、 レジの所要時間が平均3分のとき,次の値を求めてみよう。 ?到着したとき,すぐにサービスが受けられる確率 ?系の中にいる人の平均人数 ?サービスを待っている人の平均人数 ?到着してからサービスを受けて去るまでの平均時間 ?到着してからサービスを受けるまでの平均待ち時間 ?客の到着が2倍の平均24人になった。到着してからサービスを受けて去るまでの平均時間を変えないようにするには レジの平均サービス時間を何分にすればよいか?求めてみよう。 http://egg.5ch.net/test/read.cgi/hosp/1540905566/367
368: 卵の名無しさん [sage] 2018/11/27(火) 21:08:46 ID:RTIAbEXI 筆算は面倒。数値を変えても算出できるようにした。 mms <- function(n,lambda,mu,s,t=0,Print=TRUE){ alpha=lambda/mu rho=lambda/s/mu # alpha=s*rho sig0=0 for(i in 0:(s-1)) sig0=sig0+alpha^i/factorial(i) P0=1/( sig0 + alpha^s/factorial(s-1)/(s-alpha) ) Pn=ifelse(n >= s, alpha^n/factorial(s)/s^(n-s)*P0, alpha^n/factorial(n)*P0) Lq=lambda*mu*alpha^s/factorial(s-1)/(s*mu-lambda)^2*P0 L=Lq+alpha Wq=Lq/lambda #=mu*alpha^s/factorial(s-1)/(s*mu-lambda)^2*P0 W=Wq+1/mu Pc=mu*P0*alpha^s/factorial(s-1)/(s*mu-lambda) #=s^s*P0/factorial(s)*rho^s/(1-rho) PTt=Pc*exp(-(1-rho)*s*mu*t) output=c(P0=P0,Pn=Pn,Lq=Lq,L=L,Wq=Wq,W=W,Pc=Pc,PTt=PTt) # P0:0 in system, Pn:n in system, Lq:guests in que, Wq: waiting time in que # L:quests in system, W:total waiting time, Pc:all windows occupied, # P: waiting time in que greater than t if(Print) print(output,digits=3) invisible(output) } > mms(0,12/60,1/3,1) P0 Pn Lq L Wq W Pc PTt 0.4 0.4 0.9 1.5 4.5 7.5 0.6 0.6 > uniroot(function(x) mms(0,24/60,1/x,1,P=F)['W']-7.5,c(0.1,2))$root [1] 1.874993 http://egg.5ch.net/test/read.cgi/hosp/1540905566/368
上
下
前
次
1-
新
書
関
写
板
覧
索
設
栞
歴
あと 634 レスあります
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
AAサムネイル
Google検索
Wikipedia
ぬこの手
ぬこTOP
0.008s