全部版块 我的主页
论坛 金融投资论坛 六区 CFA、CVA、FRM等金融考证论坛
2885 2
2013-07-16
悬赏 3 个论坛币 未解决

O.png
有一题关于LDA用概率算损失的题如上。下面是用概率计算各种损失。

LOSS.png
我的问题是:计算LOSS 为2000时,概率为 0.2*0.6*0.6, 意思是2次损失都为1000。计算11,000时,概率为 0.2*0.6*0.3+0.2*0.3*0.6, 意思是2次损失的顺序不一样么?
那么都是2次损失,为什么2000概率不是 0.2*0.6*0.6+0.2*0.6*0.6 (同样有2次机会阿)

思绪有点混乱,希望各位大虾明白我的困惑。。。
真心求解。。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2013-7-18 15:01:00
没人。。。。5555
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-5-30 09:11:19
Let
s1 = 1000 and f(s1) = 0.6
s2 = 10000 and f(s2) = 0.3
s3 = 100000 and f(s3) = 0.1

Think of s1, s2, and s3 as three types of events. When loss = 11000, it has to be that both s1 and s2 happened, and there are two combinations, either s1 took place first then s2, or s2 took place first and then s1. When loss = 2000, it has to be that s1 happened twice, that is, s1 took place first then s1 again, which is only one combination.

# simulation in R below
x <- NULL
z <- NULL

r <- runif(100000)
x <- ifelse(r<=0.5, 0, ifelse(r<=0.8, 1, 2))
table(x)

for (i in (1:length(x))) {
  if (x[i]==0) {
    z[i] <- 0
  } else if (x[i]==1) {
    u <- runif(1)
    z[i] <- ifelse(u<=0.6, 1000, ifelse(u<=0.9, 10000, 100000))  
  } else if (x[i]==2) {
    u <- runif(1)
    y1 <- ifelse(u<=0.6, 1000, ifelse(u<=0.9, 10000, 100000))  
    u <- runif(1)
    y2 <- ifelse(u<=0.6, 1000, ifelse(u<=0.9, 10000, 100000))  
    z[i] <- y1 + y2
  }
}
table(z)/length(x)

## z
##      0    1000    2000   10000   11000   20000   1e+05  101000  110000   2e+05
## 0.49896 0.18187 0.07184 0.08981 0.07050 0.01867 0.03028 0.02429 0.01178 0.00200
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群