高校数学の質問スレ(医者・東大卒専用) Part438 (991レス)
上下前次1-新
抽出解除 レス栞
リロード規制です。10分ほどで解除するので、他のブラウザへ避難してください。
49(1): 2024/08/15(木)18:27:20.71 ID:bFfiJSUV(3/3) AAS
小学生向きの問題
王様 と 王様でない人とはどちらが多いでしょうか?
128: 2024/08/22(木)12:25:13.71 ID:KCeZ3hz8(1) AAS
>>105
自分の立場だったら記念切手の感覚でやってるフリしてる奴らて何も分かって怖い
横転した統一系のサークルで勧誘してるねー
232: 2024/10/13(日)11:47:25.71 ID:x0yyIaSy(1) AAS
f=\(n){
p=numeric()
for (a in 1:6) p[a]=sum((1/6)^(0:(n-1))*(a-1)/6)
mean(p)
}
n=1:20
y=sapply(n,f)
plot(n,y,bty='l',pch=16)
259(1): 2024/10/27(日)12:09:18.71 ID:Ll/mJg+e(3/5) AAS
>>256
妄想かなけなしの金で行ったそういう設定の風俗だろうなwww
数学板の高校生にすら相手にされないんだからリアルで誰にも相手にされるわけないww
295(1): 2024/11/01(金)11:42:21.71 ID:u3kBwXIx(1) AAS
r1=4
n1=4798
n2=1e6
r2=r1*n2/n1
k=1e5
p4=rbeta(k,1+r1,1+n1-r1)
p834=rbeta(k,1+r2,1+n2-r2)
mean(p834>p4)
hist(p834-p4)
library(fmsb)
hit=c(r1,r2)
shot=c(n1,n2)
mat=cbind(hit,missed=shot-hit)
Epi::twoby2(mat)
fisher.test(mat)
oddsratio(r1,n1-r1,r2,n2-r2)
318(1): 2024/11/18(月)08:34:06.71 ID:6QQp5ohs(1/2) AAS
>>317
なんだよ図星か
出題にしろスキルにしろ色々偏ってるな
大学で数学履修してないんだな
351(1): 2024/11/30(土)19:19:39.71 ID:xA0BaYQb(1/3) AAS
>>350これには完全ダンマリで草
954:卵の名無しさん:2024/11/30(土) 10:54:08.14 ID:Wtu16ESx
>>951
まあお前と違って俺は一回200万ぐらい病院に入る治療出来るからそういうのなら病院にとって呼ぶ価値あるけどな
車で行ってるから交通費も貰ってないけど
一回10万でやってあげてるよ
んで、お前は?GFで数件覗くだけ?
1件11400円を数件やるだけなのにわざわざ新幹線とタクシー使ってで来てもらうの?
生検やっても+3000円だぞ
採算取れるわけねーだろ
適当にM3とかで近くの車持ってる奴雇った方が安いわwww
366: 2024/12/02(月)06:58:51.71 ID:5RqvHzG8(1/3) AAS
Leyland[n_]:=(
ymax=Floor@y /. NSolve[2 y^y == n && y>1y,Reals][[1]];
xmax=Floor@x /. NSolve[x^2+2^x==n && x>1x,Reals][[1]];
z=Flatten[Table[{x^y+y^x,x,y},{x,2,xmax},{y,2,ymax}],1];
Select[z,#[[1]]==n&]
)
Leyland[42832853457545958193355601]
372: 2024/12/04(水)09:35:44.71 ID:M2J+bJMI(1/2) AAS
(* 1から100までの整数から異なる10個を選び、その合計が5の倍数になる確率を求めなさい。 *)
solve[nn_,n_,m_]:=(
ass=Counts[#]& /@ Flatten[Table[Sort /@ IntegerPartitions[x,{n},Range[0,m-1]],{x,m*Range[0,n-1]}],1];
li=KeyValueMap[List,#]& /@ ass;
{q,r}=QuotientRemainder[nn,m];
c=Flatten@{Table[q+1,r],Table[q,m-r]};
m2c[x_] :=(
i=If[x[[1]]==0,m,x[[1]]];
Binomial[c[[i]],x[[2]]]);
cases=Total[Times@@@ (m2c /@ # & /@ li)]; (* cases=Total[Times@@ #&/@ (m2c /@ # & /@ li)];*)
cases/Binomial[nn,n]
)
solve[100,10,5]
SetPrecision[%,50]
391: 2024/12/07(土)10:48:28.71 ID:xtC19jyX(1/2) AAS
m=50+1
n=2^Ceiling[Log[2,m]];
t1=Table[Reverse@IntegerDigits[x,2],{x,1,n-1}];
ans=Table[{},Log[2,n]];
For[i=1,i<m,i++,AppendTo[ans[[#]],i]& /@ Flatten@Position[t1[[i]],1]];
res=Reverse[ans];
MatrixForm@res
455: 2024/12/22(日)12:42:11.71 ID:rWRciXK9(6/8) AAS
毒薬が2本のときのWolframのコード まだぁ?
507(1): 01/05(日)12:23:25.71 ID:tuC7O64g(1) AAS
R=3;
r=2;
K=2; (* ロータ中心と頂点距離/ロータギア半径 *)
apex[t_] := Module[
{p,c,d},
p = {(R-r) Cos[t] + R Cos[(t+Pi)/3], (R-r) Sin[t] + R Sin[(t+Pi)/3]};
c = {(R-r) Cos[t],(R-r) Sin[t]};
d = K(p-c)+c
]
theta=Flatten@{Range[0,6 Pi, Pi/1000]};
ListPlot[apex[#]& /@ theta,AspectRatio ->1]
x[t_]:=apex[t][[1]]
y[t_]:=apex[t][[2]]
length=Integrate[(D[x[t],t])^2+(D[y[t],t])^2,{t,0,6 Pi}]
area=(1/2) Integrate[x[t] D[y[t],t] - y[t] D[x[t],t],{t,0, 6 Pi}]
Clear[{R,r,K}]
565(1): 01/14(火)22:49:01.71 ID:DQ0smkUQ(1) AAS
>>564
寝ても覚めてもレス乞食って虚しくないのかよ
581: 01/17(金)18:02:26.71 ID:BcOp0/e9(2/2) AAS
# incubation period for COVID-19
incu=\(x){dlnorm(x,m=1.64,s=0.58)
# lm=runif(1,1.6,1.8)
# s=runif(1,0.4,0.6)
}
incu=Vectorize(incu)
# window period for rapid antigen test
wind=\(x) dweibull(x, shape=2.5,scale=4.5)
wind=Vectorize(wind)
curve(wind,0,14,col=2,xlab='days',ylab='',axes=F) ; axis(1)
curve(incu,add=TRUE)
legend('top',bty='n',legend=c('incubation period','window period'),lty=1:1,col=1:2)
cdf_incu=\(x) integrate(incu,0,x)$value
cdf_incu=Vectorize(cdf_incu)
cdf_wind=\(x) integrate(wind,0,x)$value
cdf_wind=Vectorize(cdf_wind)
curve(cdf_wind,0,14,col=2)
curve(cdf_incu,add=TRUE)
legend('center',bty='n',legend=c('incubation period','window period'),lty=1:1,col=1:2)
pdfZ=\(z) integrate(\(x) incu(x)*wind(x-z),0,Inf)$value
pdfZ=Vectorize(pdfZ)
curve(pdfZ,-10,10,xlab='incubation-window (days)',axes=F,ylab='') ; axis(1)
integrate(pdfZ,-Inf,0)$value
fnr=\(x) integrate(pdfZ,-Inf,-x)$value # false negative rate after x days since onset of symtom
fnr=Vectorize(fnr)
curve(fnr,0,7, xlab='days after onset',ylab='false negative rate')
##
k=1e5
inc=rlnorm(k,m=1.64,s=0.58)
win=rweibull(k,shape=2.5,scale=4.5)
d=inc-win
hist(d)
mean(inc)
mean(win)
mean(inc<win) # negative test
re=NULL
for(i in 1:7) re=c(re,mean((inc+i)<win)) ; re
plot(re,pch=16)
which(re<0.05)[1]
603: 01/22(水)08:20:44.71 ID:VPFVu86y(1) AAS
>>601
精神科受診せよ
642: 02/01(土)23:30:17.71 ID:RwePvY7v(2/2) AAS
>>638
シミュレーション結果と乖離
画像リンク
100以下の確率96.3%
95%以上の確率での釈放に必要な賄賂は92ドル
となりました。
シミュレーションのコード
black={2, 4, 6, 8, 10, 11, 13, 15, 17, 20, 22, 24, 26, 28, 29, 31, 33, 35};
sim[] :=Module[{bribe,a},
bribe=0;
a=RandomChoice[Range[0,36],1][[1]];
While[ContainsAny[black,{a}],
bribe+=a;
a=RandomChoice[Range[0,36],1][[1]]
];
bribe+a
]
662(2): 02/05(水)09:00:02.71 ID:n0/BIMPM(2/4) AAS
COVID-19がrule outできるわけでもないから、
FLUとCOVID-19が1検体で抗原検査できる方がいい。
たまに両方陽性の患者に遭遇するし。
小児に受けが良いかもしれないが、
泣きわめいて暴れる小児なら器具を噛まれるのがオチの気もする。
700: 02/07(金)12:32:49.71 ID:v/30yFsg(1) AAS
60過ぎの5chでしか発狂できない老耄にそんな力残ってねぇよ
718: 02/12(水)17:43:29.71 ID:mV2bBNc5(1/2) AAS
>>717
>>714
782: 04/10(木)07:22:31.71 ID:vcXEF9PY(2/3) AAS
>>781
表裏の定義は個人によって違うから問題成立しませんね
はい終了
807: 04/30(水)07:36:17.71 ID:IZhDMqNd(1/2) AAS
>>803
スレタイ読めないのはアンタだぞマヌケ
856: 05/30(金)20:13:47.71 ID:zoAuXcvc(3/3) AAS
p_post_null <- function(p0, prior, alpha, beta, success, failure){
# Calculate the total number of trials from successes and failures.
total = success + failure
# Calculate the likelihood of the data under the null hypothesis (H0).
# This assumes a binomial distribution where the success probability is p0.
m0 = dbinom(success, total, p0)
# Calculate the marginal likelihood of the data under the alternative hypothesis (H1).
# Under H1, the success probability is assumed to follow a Beta distribution
# with parameters alpha and beta. This function (from the 'extraDistr' package)
# computes the marginal likelihood by integrating over all possible success probabilities.
m1 = extraDistr::dbbinom(success, total, alpha, beta)
# Calculate the Bayes Factor (BF01).
# This is the ratio of the likelihood under the null hypothesis (m0)
# to the marginal likelihood under the alternative hypothesis (m1).
BF01 = m0 / m1
# Calculate the posterior probability of the null hypothesis.
# This updates the prior belief (prior) based on the evidence from the data (BF01).
p_post = prior * BF01 / (prior * BF01 + 1 - prior)
# Return both the Bayes Factor and the posterior probability as a named vector.
c(BF01 = BF01, p_post = p_post)
}
# Optimize the 'alpha' parameter to maximize the posterior probability of the null hypothesis.
# We're trying to find the 'alpha' value (within the range 0 to 1e6) that makes the
# null hypothesis most plausible, given the data and the relationship beta = 5*alpha - 4.
# p_post_null(...)[2] specifically extracts the 'p_post' value from the function's output.
optimize(function(alpha) p_post_null(p0 = 1/6,
prior = 1/2,
alpha,
5 * alpha - 4, # Beta parameter is a function of alpha
success = 4,
failure = 50 - 4)[2],
c(0, 1e6)) # Search range for alpha
# Calculate the Bayes Factor and posterior probability using specific alpha and beta values.
# These specific values (alpha = 50/9, beta = 5*50/9 - 4) are likely the result of the
# optimization step above, or pre-determined values that are of interest.
p_post_null(1/6, 1/2, 50/9, 5 * 50/9 - 4, 4, 50 - 4)
989: 08/09(土)06:53:31.71 ID:niZXQaB5(3/4) AAS
>>987
動画リンク[YouTube]
の計算とグラフを再現したかったのでR言語で完遂。
上下前次1-新書関写板覧索設栞歴
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ
ぬこの手 ぬこTOP 0.050s