案例一:一个伽玛(我可以做到!)
shape<-shape*10
scale<-scale/10
p_value_average_of_10_draws<-1-pgamma(q=average_of_10_draws, shape=shape, scale=scale, lower.tail = TRUE, log.p = FALSE)
案例二:两个 Gamma(我做不到!)
shape_A<-shape_A*10
scale_A<-scale_A/10
shape_B<-shape_B*10
scale_B<-scale_B/10
pgamma_A_and_B <-
pgamma(q=average_of_10_draws, shape=shape_A, scale=scale_A, lower.tail = TRUE, log.p = FALSE)*weight_A
+
pgamma(q=average_of_10_draws, shape=shape_B, scale=scale_B, lower.tail = TRUE, log.p = FALSE)*(1-weight_A)
p_value_average_of_10_draws<-1-pgamma_A_and_B
但这是错误的!
因为它假设所有十次平局都将来自 A 或 B 之一!