我用 R 有这个功能。
immediate.amput.EV <- function(Dead.prob=.010,Dead.cost=40000,Alive.prob=.0990,Alive.cost=50000,high=100,p.payoff=1) {
return((Dead.prob * Dead.cost) + (Alive.prob * Alive.cost))
}
immediate.amput.EV()
It's supposed to output : (0.010 * 40000) + (0.990 * 50000) = 400 + 49500 = 49900
Instead it gives me: 5350
你能告诉我为什么吗?谢谢..