• Welcome to ComeFromChina Community (CFC中文网)! We are the largest Chinese Canadian community forum in Ottawa. Please to participate in discussions, post topics, view images, and access full community features. Join us today! 欢迎来到CFC中文网。请登录以参与讨论、发布主题并查看图片。

心里阴暗的数学建模

duality

知名会员
注册
2006-06-04
消息
206
荣誉分数
8
声望点数
128
假定从本板发帖用户中随机取一个,他心里阴暗的概率是 p,心里亮堂的概率是 1-p.

假定每个心理阴暗的人每次发帖以概率 a 发负帖(大概可以定义为谩骂抱怨讽刺挖苦一类的帖子),以概率 1-a 发正贴。

假定每个心里亮堂的人每次发帖以概率 b 发负帖,以概率 1-b 发正贴。
假定任何用户每次发帖是相互独立的事件。

那么,这个模型意味着以下的公式计算一个用户是不是心理阴暗根据他发的帖子: 如果该用户发的正贴的数量是 x, 负贴的数量是 y, 那么,他心理阴暗的概率是 A/(A+B). 其中
A= a^y * (1-a)^x * p
B= b^y * (1-b)^x * (1-p).

(推导使用 Bayes Rule, 步骤略去)

为简单起见,令 p=0.5, a=0.8, b=0.2. 那末该用户心里阴暗的概率是 4^y/(4^y + 4^x)
 
假定从本板发帖用户中随机取一个,他心里阴暗的概率是 p,心里亮堂的概率是 1-p.

假定每个心理阴暗的人每次发帖以概率 a 发负帖(大概可以定义为谩骂抱怨讽刺挖苦一类的帖子),以概率 1-a 发正贴。

假定每个心里亮堂的人每次发帖以概率 b 发负帖,以概率 1-b 发正贴。
假定任何用户每次发帖是相互独立的事件。

那么,这个模型意味着以下的公式计算一个用户是不是心理阴暗根据他发的帖子: 如果该用户发的正贴的数量是 x, 负贴的数量是 y, 那么,他心理阴暗的概率是 A/(A+B). 其中
A= a^y * (1-a)^x * p
B= b^y * (1-b)^x * (1-p).

(推导使用 Bayes Rule, 步骤略去)

为简单起见,令 p=0.5, a=0.8, b=0.2. 那末该用户心里阴暗的概率是 4^y/(4^y + 4^x)


Here is the detailed derivation for the interested.
Notations:
D: (the studied person) being Dark-minded
B: (the studied person) being Bright-minded
+: a posting being postive
-: a posting being negative.
x+: x independent postings (by the person) being postive
y-: y independent postings (by the person) being postive

Before any observation (i.e., seeing the person's postings),
P(D)=p, and P(B)=1-p.

Also we have,
P(+|D)=1-a; P(-|D)=a;
and
P(+|B)=1-b; p(-|B)=b;

By the independence modeling of the postings from the person,
we have
P(x+ and y- |D)= (1-a)^x * a^y
and
P(x+ and y- |B) = (1-b)^x * b^y

We are interested in finding P(D|x+ and y-). By the Bayes' Rule, we have

P(D|x+ and y-)
= P(x+ and y-|D) * P(D) /[(P(x+ and y-|D) * P(D) +(P(x+ and y-|B) * P(B)]

Replacing the involved terms by their definition in the model, we obtain

P(D|x+ and y-)= (1-a)^x * a^y * p/[(1-a)^x * a^y * p + (1-b)^x *b^y * (1-p)]

If we take p=0.5, a=0.8, b=0.2. Then we get the formula as I presented.
 
后退
顶部
首页 论坛
消息
我的