Uploaded by mahmoud50el

Stats Lecture 8

advertisement
Lecture 8
Joint Distributions
Joint Probability Distributions
• In many case, we are not only interested in one outcome/random
variable but in multiple ones.
• For instance, we may be interested in the Hardness 𝐻, and
Toughness 𝑇 of material released from a certain experiment.
• The sample space is two-dimensional, with elements being pairs
(β„Ž, 𝑑).
• In the discrete case, the joint probability distribution is defined
as:
𝑓 β„Ž, 𝑑 = 𝑃(𝐻 = β„Ž, 𝑇 = 𝑑)
2
Discrete Joint Distribution
• The function 𝑓(π‘₯, 𝑦) is a joint probability distribution or
probability mass function of the discrete random variables 𝑋and
π‘Œif
• 𝑓(π‘₯, 𝑦) ≥ 0, for all (π‘₯, 𝑦).
• σπ‘₯ σ𝑦 𝑓(π‘₯, 𝑦) = 1.
• 𝑃 𝑋 = π‘₯, π‘Œ = 𝑦 = 𝑓(π‘₯, 𝑦).
• For a region 𝐴 in the π‘₯𝑦 plane, 𝑃 π‘₯, 𝑦 ∈ 𝐴 = σ σ𝐴 𝑓(π‘₯, 𝑦) .
3
Example
•
•
•
•
•
A box contains 3 blue pens, 2 red pens, and 3 green pens.
2 pens are selected at random.
𝑋 is the number of blue pens selected.
π‘Œ is the number of red pens selected.
Find:
1. The joint probability function 𝑓(π‘₯, 𝑦).
2. 𝑃[(π‘₯, 𝑦) ∈ 𝐴], where A is the region (π‘₯, 𝑦) (π‘₯ + 𝑦) ≤ 1 .
• The possible values for the pairs are:
(0,0), (0,1), (1,0), (1,1), (0,2), and (2,0)
4
Solution
1. The number of possible ways of choosing any 2 pins is:
8
= 28
2
The number of ways of selecting 1 red from 2 red pens and 1
2 3
green from 3 green pens is
= 6. Hence, f(0,1) = 6/28=3 /14.
1 1
Similar calculations yield the probabilities for the other cases, which
are presented in Table. Note that the probabilities sum to 1.
The number of cases of choosing x blue and y red is:
3
π‘₯
2
𝑦
3
2−π‘₯−𝑦
Hence, we can write:
Note that: π‘₯ = 0,1,2; 𝑦 = 0,1,2; and 0 ≤ (π‘₯ + 𝑦) ≤ 2.
5
None
2. The probability that (π‘₯, 𝑦) falls in region 𝐴 is:
𝑃 π‘₯, 𝑦 ∈ 𝐴 = 𝑃 π‘₯ + 𝑦 ≤ 1
= 𝑓 0,0 + 𝑓 0,1 + 𝑓(1,0)
3
3
9
9
=
+
+
=
28 14 28 14
• The probability distribution 𝑓(π‘₯, 𝑦) can be tabulated:
6
Continuous Joint Distribution
• The function 𝑓(π‘₯, 𝑦) is a joint probability density function of the
continuous random variables 𝑋and π‘Œif
• 𝑓(π‘₯, 𝑦) ≥ 0, for all (π‘₯, 𝑦).
∞
∞
• ‫׬‬−∞ ‫׬‬−∞ 𝑓 π‘₯, 𝑦 𝑑π‘₯ 𝑑𝑦 = 1.
• 𝑃 π‘₯, 𝑦 ∈ 𝐴
= ‫π‘₯ 𝑓 𝐴׬ ׬‬, 𝑦 𝑑π‘₯ 𝑑𝑦.
• for any region 𝐴 in the π‘₯𝑦 plane.
7
Example
• A privately owned business operates both a drive-in facility and a
walk-in facility.
• On a randomly selected day, let X and Y , respectively, be the
times that the drive-in and the walk-in facilities are in use, and
suppose that the joint density function is:
A. Verify the conditions of the joint density function.
1 1
1
2 4
2
B. Find 𝑃 π‘₯, 𝑦 ∈ 𝐴 , where 𝐴 = (π‘₯, 𝑦) 0 < π‘₯ < , < 𝑦 <
8
Solution
A. It is easy to show that 𝑓(π‘₯, 𝑦) ≥ 0 is satisfied.
The second condition is:
∞
ΰΆ±
∞
1
1
ΰΆ± 𝑓 π‘₯, 𝑦 𝑑π‘₯ 𝑑𝑦 = ΰΆ± ΰΆ±
−∞ −∞
0
1
=ΰΆ±
0
0
2
(2π‘₯ + 3𝑦) 𝑑π‘₯ 𝑑𝑦
5
2 6𝑦
+
𝑑𝑦
5 5
9
The Mean/Expected Value
• Let 𝑋be a random variable with probability distribution 𝑓(π‘₯). The
mean, or expected value, of 𝑋is:
πœ‡π‘₯ = 𝐸 𝑋 = ෍ π‘₯𝑓(π‘₯)
π‘₯
• if 𝑋 is discrete. And:
+∞
πœ‡π‘₯ = 𝐸 𝑋 = ΰΆ±
π‘₯𝑓 π‘₯ 𝑑π‘₯
−∞
• if 𝑋 is continuous.
11
The Mean of a Random Variable
• If a fair coin is tossed twice, the sample space is:
𝑆 = {𝐻𝐻, 𝐻𝑇, 𝑇𝐻, 𝑇𝑇}
• These probabilities are the relative frequencies in the long
run. Hence,
This result means that a person who tosses 2 coins over and
over again will, on the average, get 1 head per toss.
12
Example
• Introduction
• Consider tossing two coins 16 times and X is the number of
heads that occur per toss
• The possible outcomes for every toss are: 0, 1, and 2.
• If they occur exactly: 4, 7, and 5 times, respectively.
• The mean (or mathematical expectation) is:
• Or:
• Hence, by knowing the outcomes and their relative
frequencies, we can calculate the average.
13
Example
• A certain box contains 7 components; of which 3 are defective.
• A sample of 3 is chosen by the inspector.
• What is the expected value for the number of good items in the
sample (𝑋)?
Solution:
• The probability distribution for X is:
14
• Hence:
𝑓(0) = 1/35, 𝑓(1) = 12/35, 𝑓(2) = 18/35, 𝑓(3) = 4/35
• The expected value in the long run is:
1
12
18
4
πœ‡π‘₯ = 𝐸 𝑋 = 0 ×
+1×
+2×
+3×
= 1.7
35
35
35
35
• Hence, the average over the long run is 1.7.
Thus, if a sample of size 3 is selected at random over and over again
from a lot of 4 good components and 3 defective components, it will
contain, on average, 1.7 good components.
15
Example
• 𝑋 denotes the life in hours of a certain electronic device.
• The PDF is:
• Find the expected life of this type of device.
Solution:
• The expected life is:
+∞
𝐸 𝑋 =ΰΆ±
100
+∞ 20,000
20,000
−20,000
π‘₯
𝑑π‘₯ = ΰΆ±
𝑑π‘₯ =
ቀ
3
2
π‘₯
π‘₯
π‘₯
100
20000
100
Note:
+∞
=
100
= 200
16
Functions of Random Variables
• Let 𝑋be a random variable with probability distribution 𝑓(π‘₯). The
expected value of the random variable 𝑔(𝑋)is
πœ‡π‘” 𝑋 = 𝐸 𝑔(𝑋) = ෍ 𝑔 π‘₯ 𝑓(π‘₯)
π‘₯
• if 𝑋 is discrete, and
+∞
πœ‡π‘” 𝑋 = 𝐸 𝑔(𝑋) = ΰΆ±
𝑔 π‘₯ 𝑓 π‘₯ 𝑑π‘₯
−∞
• if 𝑋 is continuous.
17
Example
• Suppose that the number of cars 𝑋that pass through a car wash
between 4: 00π‘π‘šand 5: 00 π‘π‘š on any sunny Friday has the
following probability distribution.
• Let 𝑔(π‘₯) = (2π‘₯ − 1) represent the amount of money in pounds
paid to the attendant by the manager.
• Find the attendant’s expected earnings during this 1 hour
period.
18
Solution
• Let the probability distribution of 𝑋 be denoted
by 𝑓(π‘₯).
• The attendant can expect:
= 12.67 Pounds
Example
• Let 𝑋 be a random variable with density function
• Find the expected value of 𝑔(𝑋) = (4𝑋 + 3).
• Solution:
=8
20
Download