第二讲随机变量基础演示文稿
合集下载
相关主题
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
1 e Head X (e) 0 e Tail
根据随机变量取值的不同可以分为:
连续型随机变量(Continuous random variable)
离散型随机变量(Discrete random variable)
A discrete random variable is a random variable that can be take on at most a countable number of possible values
Fra Baidu bibliotek
利用频率估计概率
n次重复试验中,事件A发生的次数为nA,比值 称为事件A发生的频率。频率反映了事件A发生 的频繁程度,若事件A发生的可能性大,那么 相应的频率也大,反之则较小。
概率 P(A) lim nA n n
计算机模拟:
投掷一枚均匀硬币,模拟计算出现正面的概率。
number=0; for i=1:N % set up simulation for 4 coin toses
连续的样本空间: S R, or S [a,b]
由多次子试验构成的样本空间:--看下例
IF we toss a coin three times and let the triplet xyz denote the outcome “x on the first toss, y on the second toss, z on the third toss”, then the sample space of the experiment is
PX (k) P{X k} P(00....01) (1 p)k1 p qk1 p
X (e)
S
Random variable is a function that assigns a numerical value to the outcome of the experiment.
A coin toss
X (e1)
Real line
e1●
●
●
0
1
Se2● X (e2 )
Mapping of the outcome of a coin toss into the set of real number
X is a discrete random variable taking on values from S={1,2,3,….}
The event {X=k} occurs if k-1 consecutive erroneous transmissions (failures) followed by a error-free one (success)
if rand(1,1)<0.5 % toss coin with p=0.5 x(i,1)=1; % head
else x(i,1)=0; % tail
end number=number+x(i,1);% count number of heads end P=number/N;
1.2 随机变量的定义 (Definition of a random variable) 1. 定义
设随机试验E的样本空间为S={e},如果对于每 一个eS,有一个实数X(e)与之对应,这样就得 到一个定义在S上的单值函数X(e),称X(e)为随 机变量,简记为X。
随机变量是定义在样本空间S上的单值函数
Interpretation of random variable:
e●
● Real line
指示型随机变量
随机变量的可能取值为0和1两个值,PMF为
1 p k 0
PMF:
PX (k)
p
k 1
PX (k) 1 p p
01
k
(0,1)分布的随机变量; 指示型随机变量; 贝努里随机变量;
Bernoulli random variable
Let A be an event of interest in some experiment, e.g., a device is not defective. We say that a “success” occurs if A occurs when we perform the experiment. Bernoulli random variable IA is equal to 1 if A occurs and zero otherwise.
S={HHH, HHT, HTH, HTT, THH, THT, TTH, TTT}
The event “ one head and two tails” is defined by E={HTT, THT, TTH}
由多次子试验构成的样本空间 可数无穷的样本空间
S=S1 S1… ={HH…, HT…, TH…, TT…, …} S1={H,T}
2. 概率分布列
P(X xk ) pk (k 1,2,...., n)
X
x1
x2 ...
pk
p1
p2 ...
xn
n
pn
pk 1
k 1
Probability mass function (PMF)
PX (xk ) P(X xk ) pk (k 1, 2,...., n)
•(0,1)分布
0 if e not in A
IA (e) 1
if e in A
PI (0) P{IA(e) 0} 1 p PI (1) P{IA(e) 1} p
例:信息传输问题(Message Transmissions)
Let X be the number of times needs to be transmitted until it arrivers correctly at its destination. Find the probability that X is an a even number.
第二讲随机变量基础演示文稿
优选第二讲随机变量基础
投掷骰子出现1点 {1,2,3,4,5,6} 投掷骰子出现偶数点
样本空间 随机事件 基本事件
关于样本空间的注释: Discrete Sample Space:
Toss a die: S={1,2,3,4,5,6} Toss a coin:S={Head, Tail}={H,T}
根据随机变量取值的不同可以分为:
连续型随机变量(Continuous random variable)
离散型随机变量(Discrete random variable)
A discrete random variable is a random variable that can be take on at most a countable number of possible values
Fra Baidu bibliotek
利用频率估计概率
n次重复试验中,事件A发生的次数为nA,比值 称为事件A发生的频率。频率反映了事件A发生 的频繁程度,若事件A发生的可能性大,那么 相应的频率也大,反之则较小。
概率 P(A) lim nA n n
计算机模拟:
投掷一枚均匀硬币,模拟计算出现正面的概率。
number=0; for i=1:N % set up simulation for 4 coin toses
连续的样本空间: S R, or S [a,b]
由多次子试验构成的样本空间:--看下例
IF we toss a coin three times and let the triplet xyz denote the outcome “x on the first toss, y on the second toss, z on the third toss”, then the sample space of the experiment is
PX (k) P{X k} P(00....01) (1 p)k1 p qk1 p
X (e)
S
Random variable is a function that assigns a numerical value to the outcome of the experiment.
A coin toss
X (e1)
Real line
e1●
●
●
0
1
Se2● X (e2 )
Mapping of the outcome of a coin toss into the set of real number
X is a discrete random variable taking on values from S={1,2,3,….}
The event {X=k} occurs if k-1 consecutive erroneous transmissions (failures) followed by a error-free one (success)
if rand(1,1)<0.5 % toss coin with p=0.5 x(i,1)=1; % head
else x(i,1)=0; % tail
end number=number+x(i,1);% count number of heads end P=number/N;
1.2 随机变量的定义 (Definition of a random variable) 1. 定义
设随机试验E的样本空间为S={e},如果对于每 一个eS,有一个实数X(e)与之对应,这样就得 到一个定义在S上的单值函数X(e),称X(e)为随 机变量,简记为X。
随机变量是定义在样本空间S上的单值函数
Interpretation of random variable:
e●
● Real line
指示型随机变量
随机变量的可能取值为0和1两个值,PMF为
1 p k 0
PMF:
PX (k)
p
k 1
PX (k) 1 p p
01
k
(0,1)分布的随机变量; 指示型随机变量; 贝努里随机变量;
Bernoulli random variable
Let A be an event of interest in some experiment, e.g., a device is not defective. We say that a “success” occurs if A occurs when we perform the experiment. Bernoulli random variable IA is equal to 1 if A occurs and zero otherwise.
S={HHH, HHT, HTH, HTT, THH, THT, TTH, TTT}
The event “ one head and two tails” is defined by E={HTT, THT, TTH}
由多次子试验构成的样本空间 可数无穷的样本空间
S=S1 S1… ={HH…, HT…, TH…, TT…, …} S1={H,T}
2. 概率分布列
P(X xk ) pk (k 1,2,...., n)
X
x1
x2 ...
pk
p1
p2 ...
xn
n
pn
pk 1
k 1
Probability mass function (PMF)
PX (xk ) P(X xk ) pk (k 1, 2,...., n)
•(0,1)分布
0 if e not in A
IA (e) 1
if e in A
PI (0) P{IA(e) 0} 1 p PI (1) P{IA(e) 1} p
例:信息传输问题(Message Transmissions)
Let X be the number of times needs to be transmitted until it arrivers correctly at its destination. Find the probability that X is an a even number.
第二讲随机变量基础演示文稿
优选第二讲随机变量基础
投掷骰子出现1点 {1,2,3,4,5,6} 投掷骰子出现偶数点
样本空间 随机事件 基本事件
关于样本空间的注释: Discrete Sample Space:
Toss a die: S={1,2,3,4,5,6} Toss a coin:S={Head, Tail}={H,T}