高校数学の質問スレ(医者・東大卒専用) Part438 (991レス)
前次1-
抽出解除 レス栞

8
(1): 132人目の素数さん [] 2024/08/09(金)18:18:03.34 ID:wVA5P02N(1)
兄より優れた弟など存在しないってジャギさんが言ってた
60: 132人目の素数さん [sage] 2024/08/16(金)14:25:35.34 ID:D3c2lioP(2/2)
スレタイ以外のことでいくら発狂したところで無視されるのは当たり前だろマヌケ
無理数の>>31すら答えられないのかよ?
103: 132人目の素数さん [sage] 2024/08/20(火)08:08:58.34 ID:O+DDQLmu(2/4)
jan[n_,m_] := (
If[m==0 || m>n, Return[0]];
If[m==n,1 - 3*(2^n-2)/3^n,3*Binomial[n,m]/3^n]
)
n=11;
pn={jan[n,1]};
Total@Flatten@Table[jan[n,x1]jan[x1,1],{x1,2,n}]//AppendTo[pn,#]&;
Total@Flatten@Table[jan[n,x1]jan[x1,x2]jan[x2,1],{x1,2,n},{x2,2,x1}]//AppendTo[pn,#]&;
Total@Flatten@Table[jan[n,x1]jan[x1,x2]jan[x2,x3]jan[x3,1],{x1,2,n},{x2,2,x1},{x3,2,x2}]//AppendTo[pn,#]&;
Total@Flatten@Table[jan[n,x1]jan[x1,x2]jan[x2,x3]jan[x3,x4]jan[x4,1],{x1,2,n},{x2,2,x1},{x3,2,x2},{x4,2,x3}]//AppendTo[pn,#]&;
Total@Flatten@Table[jan[n,x1]jan[x1,x2]jan[x2,x3]jan[x3,x4]jan[x4,x5]jan[x5,1],{x1,2,n},{x2,2,x1},{x3,2,x2},{x4,2,x3},{x5,2,x4}]//AppendTo[pn,#]&;
...
Total@Flatten@Table[jan[n,x1]jan[x1,x2]jan[x2,x3]jan[x3,x4]jan[x4,x5]jan[x5,x6]jan[x6,x7]jan[x7,x8]jan[x8,x9]jan[x9,x10]jan[x10,x11]jan[x11,x12]jan[x12,x13]jan[x13,x14]jan[x14,x15]jan[x15,x16]jan[x16,x17]jan[x17,x18]jan[x18,x19]jan[x19,x20]jan[x20,x21]jan[x21,x22]jan[x22,x23]jan[x23,x24]jan[x24,x25]jan[x25,x26]jan[x26,x27]jan[x27,x28]jan[x28,1],{x1,2,n},{x2,2,x1},{x3,2,x2},{x4,2,x3},{x5,2,x4},{x6,2,x5},{x7,2,x6},{x8,2,x7},{x9,2,x8},{x10,2,x9},{x11,2,x10},{x12,2,x11},{x13,2,x12},{x14,2,x13},{x15,2,x14},{x16,2,x15},{x17,2,x16},{x18,2,x17},{x19,2,x18},{x20,2,x19},{x21,2,x20},{x22,2,x21},{x23,2,x22},{x24,2,x23},{x25,2,x24},{x26,2,x25},{x27,2,x26},{x28,2,x27}]//AppendTo[pn,#]&;
Total@Flatten@Table[jan[n,x1]jan[x1,x2]jan[x2,x3]jan[x3,x4]jan[x4,x5]jan[x5,x6]jan[x6,x7]jan[x7,x8]jan[x8,x9]jan[x9,x10]jan[x10,x11]jan[x11,x12]jan[x12,x13]jan[x13,x14]jan[x14,x15]jan[x15,x16]jan[x16,x17]jan[x17,x18]jan[x18,x19]jan[x19,x20]jan[x20,x21]jan[x21,x22]jan[x22,x23]jan[x23,x24]jan[x24,x25]jan[x25,x26]jan[x26,x27]jan[x27,x28]jan[x28,x29]jan[x29,1],{x1,2,n},{x2,2,x1},{x3,2,x2},{x4,2,x3},{x5,2,x4},{x6,2,x5},{x7,2,x6},{x8,2,x7},{x9,2,x8},{x10,2,x9},{x11,2,x10},{x12,2,x11},{x13,2,x12},{x14,2,x13},{x15,2,x14},{x16,2,x15},{x17,2,x16},{x18,2,x17},{x19,2,x18},{x20,2,x19},{x21,2,x20},{x22,2,x21},{x23,2,x22},{x24,2,x23},{x25,2,x24},{x26,2,x25},{x27,2,x26},{x28,2,x27},{x29,2,x28}]//AppendTo[pn,#]&;
Total@Flatten@Table[jan[n,x1]jan[x1,x2]jan[x2,x3]jan[x3,x4]jan[x4,x5]jan[x5,x6]jan[x6,x7]jan[x7,x8]jan[x8,x9]jan[x9,x10]jan[x10,x11]jan[x11,x12]jan[x12,x13]jan[x13,x14]jan[x14,x15]jan[x15,x16]jan[x16,x17]jan[x17,x18]jan[x18,x19]jan[x19,x20]jan[x20,x21]jan[x21,x22]jan[x22,x23]jan[x23,x24]jan[x24,x25]jan[x25,x26]jan[x26,x27]jan[x27,x28]jan[x28,x29]jan[x29,x30]jan[x30,1],{x1,2,n},{x2,2,x1},{x3,2,x2},{x4,2,x3},{x5,2,x4},{x6,2,x5},{x7,2,x6},{x8,2,x7},{x9,2,x8},{x10,2,x9},{x11,2,x10},{x12,2,x11},{x13,2,x12},{x14,2,x13},{x15,2,x14},{x16,2,x15},{x17,2,x16},{x18,2,x17},{x19,2,x18},{x20,2,x19},{x21,2,x20},{x22,2,x21},{x23,2,x22},{x24,2,x23},{x25,2,x24},{x26,2,x25},{x27,2,x26},{x28,2,x27},{x29,2,x28},{x30,2,x29}]//AppendTo[pn,#]&;
pn
Accumulate[pn]
% // N
106
(1): 132人目の素数さん [sage] 2024/08/20(火)08:24:57.34 ID:cBs2zsg2(1)
ここまで教えてもらってまだできんww wwwwww
無能wwwwwwwwwwwwwww
121: 132人目の素数さん [] 2024/08/21(水)20:34:12.34 ID:YldtGvrJ(1)
逆に言えば、僕らはそれを隠してたんだね
233
(1): 132人目の素数さん [sage] 2024/10/24(木)16:47:36.34 ID:pQNl9nxD(1)
(*
血液型 AB型10人、B型20人、O型30人、A型40人の100人から無作為に別人を4人選ぶとき
選ばれた4人の血液型がすべて異なる確率を算出せよ。
*)

a=Flatten@{Table[1,10],Table[2,20],Table[3,30],Table[4,40]};
N@Mean@Table[Boole[Length@Union@RandomSample[a,4]==4],1*^6]
420: 132人目の素数さん [sage] 2024/12/11(水)19:03:34.34 ID:qk9aTmTZ(6/6)
ネズミと試薬の組み合わせ行列から単射になるかを判定する関数はできたが
総当たりするには数が多すぎる。

"
行:ネズミ 列:混合試薬 から 単射 か否かを判定する。
試薬数が不揃いなときはNAを入れる
[,1] [,2] [,3] [,4]
[1,] 1 2 3 8
[2,] 2 4 5 6
[3,] 1 2 4 5
[4,] 1 3 4 6
[5,] 4 6 7 NA
[6,] 1 2 5 NA
"

rm(list=ls())

rats <- function(num, N=2, digit = 6){
r=num%%N
q=num%/%N
while(q > 0 | digit > 1){
r=append(q%%N,r)
q=q%/%N
digit=digit-1
}
which(r==1)
}

cm=t(combn(8,2))
calc82=\(mat,verbose=FALSE){
lost=\(y){
m=nrow(mat)
tmp1=(apply(mat,1, \(x) y[1] %in% x) | apply(mat,1, \(x) y[2] %in% x))
tmp2=as.integer(tmp1)
tmp2 %*% c(2^(0:(m-1)))|> as.vector() -> tmp3
tmp3
}
i=apply(cm,1,lost)
re=sapply(1:max(i),\(x) cm[i==x,])
if(verbose) print(re)
all(unlist(lapply(re,length))<=2)
}

mat=t(replicate(6,sort(sample(8,4)))) ; mat
calc82(mat,TRUE)
519: 132人目の素数さん [sage] 01/08(水)20:30:20.34 ID:SKdwPI7I(4/4)
>>517
期待値の差よりも
回数の差の分布の方が直感に近いな。
525: 132人目の素数さん [sage] 01/09(木)08:14:47.34 ID:o9+qLk7l(1/2)
limit = 10000

max_count = 0
best_n = 0

for (n in 1:(limit - 1)) {
count = 0
for (y in 1:(n - 1)) {
if ((n*y) %% (n-y) ==0 & n!=y){ # x が整数になる条件
count = count + 1
}
}
if (count > max_count) {
max_count = count
best_n = n
}
}

best_n
max_count
670: 132人目の素数さん [sage] 02/06(木)11:03:45.34 ID:TtoC1Krw(1)
臨床応用問題(別名:裏口容疑者判定問題)

インフルエンザの咽頭画像AI診断支援機器(AI群)は
従来のイムノクロマト法による抗原検査(immuno群)よりも発症12時間以内での感度が高いという。
ある試験ではAI群14/17 immuno群11/17であった。
【問題】AI群の感度がimmuno群の1.5倍以上である確率、2倍以上である確率を求めよ。
算出に必要な条件は適宜設定してよい。
768: 132人目の素数さん [sage] 03/25(火)20:20:38.34 ID:JvJVqzfB(6/6)
mat1=t(apply(ans1,1, \(x) c(x,fn_rest(v,x))))
M1=matrix(c("赤","黒","白","青")[mat1],ncol=10) |> noquote()
L1=cbind(M1[,1],'|',M1[,2],'|',M1[,3:10]) |> noquote() ; L1

mat2=t(apply(ans2,1, \(x) c(x,fn_rest(v,x))))
M2=matrix(c("赤","黒","白","青")[mat2],ncol=10) |> noquote()
L2=cbind(M2[,1],'|',M2[,2:3],'|',M2[,4:10]) |> noquote() ; L2

mat3=t(apply(ans3,1, \(x) c(x,fn_rest(v,x))))
M3=matrix(c("赤","黒","白","青")[mat3],ncol=10) |> noquote()
L3=cbind(M3[,1],'|',M3[,2:4],'|',M3[,5:10]) |> noquote() ; L3

mat4=t(apply(ans4,1, \(x) c(x,fn_rest(v,x))))
M4=matrix(c("赤","黒","白","青")[mat4],ncol=10) |> noquote()
L4=cbind(M4[,1],'|',M4[,2:5],'|',M4[,6:10]) |> noquote() ; L4

mat5=t(apply(ans5,1, \(x) c(x,fn_rest(v,x))))
M5=matrix(c("赤","黒","白","青")[mat5],ncol=10) |> noquote()
L5=cbind(M5[,1:2],'|',M5[,3:4],'|',M5[,5:10]) |> noquote() ; L5

mat6=t(apply(ans6,1, \(x) c(x,fn_rest(v,x))))
M6=matrix(c("赤","黒","白","青")[mat6],ncol=10) |> noquote()
L6=cbind(M6[,1:2],'|',M6[,3:5],'|',M6[,6:10]) |> noquote() ; L6

mat7=t(apply(ans7,1, \(x) c(x,fn_rest(v,x))))
M7=matrix(c("赤","黒","白","青")[mat7],ncol=10) |> noquote()
L7=cbind(M7[,1:2],'|',M7[,3:5],'|',M7[,6:10]) |> noquote() ; L7

mat8=t(apply(ans8,1, \(x) c(x,fn_rest(v,x))))
M8=matrix(c("赤","黒","白","青")[mat8],ncol=10) |> noquote()
L8=cbind(M8[,1:3],'|',M8[,4:6],'|',M8[,7:10]) |> noquote() ; L8

RES=rbind(L1,L2,L3,L4,L5,L6,L7,L8)|> noquote()
nrow(RES)
head(RES,30)
tail(RES,30)
849: 132人目の素数さん [sage] 05/25(日)06:42:27.34 ID:P4nhnL8B(3/6)
>>847
このプロトタイプをAIに与えて描画機能やコメントをつけてもらった。

beta.parameter <- function(lower, upper, credMass = 0.95, verbose = FALSE) {

# Helper function to convert decimal numbers to fraction strings using MASS::fractions
fractionStr <- function(x) {
as.character(MASS::fractions(x))
}

# Function to compute beta parameter (beta) based on alpha,
# derived from the condition on the shape of the distribution between lower and upper
f <- function(alpha) {
1 + ((alpha - 1) * log(upper / lower)) / log((1 - lower) / (1 - upper))
}

# Root-finding function: difference between desired credible mass
# and the Beta CDF probability between lower and upper with parameters (alpha, f(alpha))
g <- function(alpha) {
pbeta(upper, alpha, f(alpha)) - pbeta(lower, alpha, f(alpha)) - credMass
}

# Find the root of g(alpha) = 0 over the interval [1, 1e5]
# to find the alpha value that satisfies the credible mass condition
re <- uniroot(g, c(1, 1e5))
alpha <- re$root
beta <- f(alpha)

# Calculate the mean of the Beta distribution
mean <- alpha / (alpha + beta)

# Calculate the mode if defined (alpha > 1 and beta > 1),
# otherwise set mode to NA as it is undefined
mode <- if (alpha > 1 && beta > 1) {
(alpha - 1) / (alpha + beta - 2)
} else {
NA
}
864: 132人目の素数さん [sage] 06/03(火)23:40:25.34 ID:CfA5PBxZ(2/2)
k=10
m=400
Nmax=1000
sim = \(){
N=sample(m:Nmax,1)
if(max(sample(1:N,k))==m) return(N)
}
N=NULL
while(length(N)<1000) N=c(N,sim())
summary(N)
quantile(N,c(0.5,0.95))
前次1-
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ AAサムネイル

ぬこの手 ぬこTOP 0.033s