资源描述
3. Random Variables
3.1 Definition of Random Variables
In engineering or scientific problems, we are not only interested in the probability of events, but also interested in some variables depending on sample points. (定义在样本点上的变量)
For example, we maybe interested in the life of bulbs produced by a certain company, or the weight of cows in a certain farm, etc. These ideas lead to the definition of random variables.
1. random variable definition
Definition 3.1.1 A random variable is a real valued function defined on a sample space; i.e. it assigns a real number to each sample point in the sample space.
Here are some examples.
Example 3.1.1 A fair die is tossed. The number shown is a random variable, it takes values in the set .
Example 3.1.2 The life of a bulb selected at random from bulbs produced by company A is a random variable, it takes values in the interval .
Since the outcomes of a random experiment can not be predicted in advance, the exact value of a random variable can not be predicted before the experiment, we can only discuss the probability that it takes some value or the values in some subset of R.
2. Distribution function
Definition 3.1.2 Let be a random variable on the sample space . Then the function
.
is called the distribution function of
Note The distribution function is defined on real numbers, not on sample space.
Example 3.1.3 Let be the number we get from tossing a fair die. Then the distribution function of is (Figure 3.1.1)
Figure 3.1.1 The distribution function in Example 3.1.3
3. Properties
The distribution function of a random variable has the following properties:
(1) is non-decreasing.
In fact, if , then the event is a subset of the event ,thus
(2),
.
(3)For any , .This is to say, the distribution function of a random variable is right continuous.
Example 3.1.4 Let be the life of automotive parts produced by company A , assume the distribution function of is (in hours)
Find ,.
Solution
By definition,
.
Question: What are the probabilities and ?
Example 3.1.5 A player tosses two fair dice, if the total number shown is 6 or more, the player wins $1, otherwise loses $1. Let be the amount won, find the distribution function of .
Solution
Let be the total number shown, then the events contains sample points, . Thus
,
And
so
Thus
Figure 3.1.2 The distribution function in Example 3.1.5
The distribution function of random variables is a connection between
probability and calculus. By means of distribution function, the main tools in calculus, such as series, integrals are used to solve probability and statistics problems.
3.2 Discrete Random Variables 离散型随机变量
In this book, we study two kinds of random variables.
Definition 3.2.1 A random variable is called a discrete random variable, if it takes values from a finite set or, a set whose elements can be written as a sequence
Assume a discrete random variable takes values from the set . Let
, (3.2.1)
Then we have , .
the probability distribution of the discrete random variable (概率分布)
X
a1
a2
an
probability
p1
p2
pn
注意随机变量X的分布所满足的条件
(1) Pi ≥0
(2) P1+P2+…+Pn=1
离散型分布函数
And the distribution function of is given by
(3.2.2)
In general, it is more convenient to use (3.2.1) instead of (3.2.2). Equation (3.2.1) is called the probability distribution of the discrete random variable .
Example 1
For an experiment in which a coin is tossed three times (or 3 coins are tossed once), construct the distribution of X. (Let X denote the number of head occurrence)
Solution
n=3, p=1/2
X pr
0 1/8
1 3/8
2 3/8
3 1/8
Example 2
在一次试验中,事件A发生的概率为p, 不发生的概率为1-p, 用X=0表示事件A没有发生,X=1表示事件A发生,求X的分布。
two-point distribution(两点分布)
X
0
1
P
1-p
p
某学生参加考试得5分的概率是p, X表示他首次得5分的考试次数,求X的分布。
geometric distribution (几何分布)
X
1
2
3
4
…
k
…
P
p
q1p
q2p
q3p
qk-1p
…
Example 3 (射击5发子弹)
某射手有5发子弹,射一次命中率为0.9,如果命中目标就停止射击,如果不命中则一直射到子弹用尽,求耗用子弹数x的概率分布。
*****
Example 3.2.1
A die is tossed, by we denote the number shown, Assume that the probability is proportional to , . Find the probability distribution of .
Solution Assume that
, constant, .
Since the events , are mutually exclusive and their union is the certain event, i.e., the sample space , we have
,
thus . The probability distribution of is (Figure 3.2.1)
, .
Figure 3.2.1 Probability distribution in Example 3.2.1
Question. What is the difference between distribution functions and probability distributions
例2 有一种验血新方法:把k个人的血混在一起进行化验,如果结果是阴性,那么对这k 个人只作一次检验就够了,如果结果是阳性,那么必须对这k个人再逐个分别化验,这时k个人共需作k+1次检验。
假设对所有人来说,化验是阳性反应的概率为p,而且这些人反映是独立的。设表示每个人需要化验的次数,求的分布(construct the distribution of )
Binomial distribution(二项分布)
Example 3.2.2 A fair die is tossed 4 times. Let be the number of six got. Find the probability distribution of .
Solution. The possible values of are .
First we find the probability .
Since means that no six occur in 4 tosses.
The probability that six fails to occur in a single toss is , and all trials are independent, so
.
Now consider the probability , .
Since means that six occurs exactly times, they may occur in any tosses of 4 tosses.
The event that they occur in a special order (for example, the first tosses), has probability ,
and we have such combinations. Thus
i.e.
.
X
0
1
2
3
4
P
Binomial Distributions
An experiment often consists of repeated trials, each with two possible outcomes “success” and “failure”. The most useful application deals with the testing of items as they come off an assembly line, where each test or trial may indicate a defective or a non-defective item. We may choose to define either outcome as a success. The process is referred to a Bernoulli process. Each trial is called a Bernoulli trial.
Consider an experiment consists of independent repeated trials, each trials result in two outcomes “success” and “failure”, and the probability of success, denote by , remains constant. Then this process is called a Bernoulli process.
Definition 3.4.1 The number of successes in Bernoulli trials is called a binomial random variable. The probability distribution of this discrete random variable is called the binomial distribution with parameters and , denoted by .
The random variable in Example 3.2.2 is an example of binomial random variable.
Theorem 3.4.1 The probability distribution of the binomial distribution with parameters and is given by
, (3.4.1)
Proof First, consider the probability of obtaining consecutive successes, followed by consecutive failures. These events are independent, therefore the desired probability is .
Since the successes and failures may occur in any order, and for any specific order, the probability is again . We must now determine the total number of sample points in the experiment that have successes and failures. This number is equal to the number of partition of outcomes into two groups with in one group and in the other, i.e. . Because the partitions are mutually exclusive, thus we have
,
Let , the binomial expansion of the expression gives
.
Each term correspond to various values of binomial distribution, this is the reason that we called it “binomial distribution”.
Example 2
For an experiment in which 9 coins are tossed, Let X denotes the number of head occurrence, construct the binomial distribution of X
what is the probability of obtaining between 3 and 6 successes.
poisson distribution(泊松分布)
Definition 3.5.1 A discrete random variable is called a Poisson random variable, if it takes values from the set , and if
, (3.5.1)
Distribution (3.5.1) is called the Poisson distribution with parameter, denoted by .
Note that
.
Here are some examples of Poisson random variables:
(a) the number of radioactive particles passing through a counter in certain time period;
(b) the number of telephone calls received by an office in certain time period;
(c) the number of bacteria in a given culture;(细菌,培养基)
(d) the number of typing errors per page in a certain book.
Example 3.5.1
From a laboratory experiments, it is known that the number of radioactive particles passing(放射性粒子) through a counter in a given millisecond is a Poisson random variable with parameter . What is the probability that 6 particles enter the counter in a given millisecond?
Solution The probability is
.
Example 3.5.2
The number of oil tankers arriving each day at a certain port is a Poisson random variable with parameter 10. What is the probability that on a given day no more than 3 tankers having arrived?
Solution. The probability is
.
Homework
Chapter 3 (P47) 1, 2, 3, 5,7, 21
二项分布与泊松分布的关系
Theorem 3.5.2
Let be a sequence of binomial random variables with probability distribution . If for some constant , we have when , and , then
, when , and .
proof
****
Example 3.5.4 Suppose that, on average, 1 person in 1000 makes a numerical error in preparing his or her income tax return. If 5000 forms are selected at random and examined, find the probability that 6, 7 or 8 of the forms contain an error.
Solution Let be the number of forms contain an error, then has the binomial distribution of parameter and .
Using Poisson distribution as approximations, we have
;
;
.
二项分布的应用例子
Example 3.4.1 It is known that 15% of certain articles manufactured are defective, what is the probability that in a random sample of 5 articles
(a ) exactly 2 are defective.
(b) at least 2 are defective.
Solution In this case, .
(a) The probability is
.
(b)The desired probability is the sum of getting 2, 3, 4, 5 defective articles, or, we may first find the probability of the complement event, i.e., getting or 1 defective article. So, if we denote the number of defective articles by , then we have
. □
Example 3.4.2 A man is able to hit a target 7 times of 10 on the average.
(a) Find the probability that he hits the target exactly 3 times in 6 shots;
(b) In how many shots the probability that he hits the target at least one time is greater than 0.95?
Solution (a) The probability is
.
(b) In shots, the probability that he hits at least one time is
.
Since when , we have
,
so in 3 shots, the probability that he hits the target at least one time is .
3.3. Expectation and Variance
1.Expectation (mean) 数学期望
Suppose in the final exam, you got 85 in calculus, 90 in algebra and 83 in statistics, then your average score is .
Assume a player tossed a fair die 20 times. He won $11 when he get six and lost $1 otherwise. If he gets six 4 times. Then the average amount he gets per toss is
Consider the future games. Since we cannot predict the outcome of the game, we cannot predict the exact amount he will win in the game. But we can predict the average amount he will win. Assume he tosses the die 600 times, in average, six will occur 100 times, thus, the average amount he will win per toss would be
We say that in average he will win $1 per toss.
Definition 3.3.1 Let be a discrete random variable. The expectation or mean of is defined as
(3.3.1)
Notice
In the case that takes values from an infinite number set, (3.3.1) becomes an infinite series. If the series converges absolutely(级数绝对收敛), we say the expectation exists, otherwise we say that the expectation of does not exist.
Example 3.3.1
A fair die is tossed . Find the expectation of spots shown.
Solution Since takes values from the set and the distribution is
, .
Thus,
.
If a discrete random variable assume each of its values with an equal probability, we say this probability distribution is a discrete uniform distribution(离散均匀分布). The distribution in Example 3.3.1 is a discrete uniform distribution.
Example 3.3.2
A player tosses a fair coin until a head occurs. If the first head occurs at -th time, the player wins dollars. Find the average amount the player wins.
Solution Let be the amount the player wins. Then takes values from the set . The player wins dollars if and only if he gets tails first, and follows by a head. Thus
So
二项分布的数学期望
Now we give the expectation and variance of binomial distribution.
Theorem 3.4.3 The expectation and variance of a binomial random variable with parameters n and p are given by
. (3.4.2)
Proof Consider the identity
.
Regard as constants, as a variable. Differentiate both sides of this identity with respect to , we have
. (3.4.3)
Put , we get
.
But , thus
Take differentiation on both sides of (3.4.3),
.
Put , we get
. (3.4.4)
Add (3.4.3) and (3.4.4) to get
泊松分布的期望
Theorem 3.5.1 The expectation and variance of a Poisson random variable with parameter are, respectively,
and . (3.5.2)
Proof By the definition,
.
Homework chapter 3
8, 9, 10, 22, 27, 30
2008-3-19
验血问题
验血次数X 的数学期望为
N个人平均需化验的次数为 . 由此可知,只要选择使 , 则N个人平均需化验的次数.
当固定时,我们选取使得小于1且取到最小值,这时就能得到最好的分组方法.
例如,,则,当时, 取到最小值. 此时得到最好的分组方法.若,此时以分组,则按第二方案平均只需化验
.
这样平均来说,可以减少40%的工作量.
补充例
问题提出
某工厂需要在五周内采购1000吨原料,估计原料价格为500元的概率为0.3,600元的概率为0.3,700元的概率为0.4,试求最佳采购策略,使采购价格的期望值最小。
思考题
如果你能预先知道5周的原料价格,当然是按最低价购买全部原料, 则此时价格的期望值是多少?
The expectation of discrete random variables has the following properties
数学期望性质
Theorem 3.3.1 Let be a discrete random variable, then (assume all expectations exist):
(a) If for some constant , then .
(b) Let be a function of , then
(3.3.2)
(c) If are discrete random variables, then
(3.3.3)
(d) If , then .
(e) If and , then .
(f) For any constant , (3.3.4)
(g) Schwarz’s inequality. (许瓦慈不等式)Let X,Y be random variables, then
(3.3.5)
The equality holds iff or for some constant a.
Proof (a) By the definition.
.
In the summation, for the term and for the other terms thus a.
(b), (c) The proofs are given in advanced probability theory, so is omitted here.
(d) If , then in the summation
each term is non-negative, thus
展开阅读全文