1
SBS2203 Bio-Statistics
Chapter 3
3.1 Random variable, Discrete random variable and Probability mass
function
3.2 Continuous Random Variable and Probability Density Function
3.3 Special discrete probability distributions
3.4 Special continuous probability distributions
2
3.1 Random variable, Discrete random variable and
Probability mass function
Definition
Let be a sample space. Let be a function from to (i.e. ). Then is
called a random variable.
.
.
.
.
.
Sample Space Induced Sample Space
3
• A random variable assigns a real number to each
outcome of the sample space.
• The range of the random variable is called the “induced
sample space”.
• Two types of random variables:
• Discrete random variable - induced sample space is
countable.
• Continuous random variable - induced sample space
is not countable.
4
Event in terms of random variable
Example 3.1.1
Consider the experiment of tossing a coin. Express the
following events using a suitably defined random variable.
5
Example 3.1.2
Consider the experiment of tossing a coin 10 times. Let be the event of
getting number of heads. Write in terms of a suitably defined random
variable.
Example 3.1.3
Consider the experiment of weighing the yield (in pounds) obtained from a
randomly selected chilly plant of a certain chilly plot. Consider the
following events.
Write the above events in terms of a suitably defined random variable.
6
Example 3.1.4
Consider the experiment of measuring the life time of a randomly
selected bulb of a certain kind. Express the following events in
terms of a suitably defined random variable.
7
Example 3.1.5
Consider the experiment of taking two products randomly
from a production line and determine whether each is
defective or not. Express the following events using a
suitably defined random variable.
8
Probability Mass Function (pmf)
• The function that gives the probability of each possible value of a
discrete random variable is called its probability mass function.
• Suppose that is a discrete random variable. The probability mass
function of random variable is defined by as follows:
R
• The pmf can be an equation, a table or a graph that shows how
probability is assigned to possible values of the random variable.
9
Example 3.1.6
Consider the experiment of tossing a coin. Let,
Find the probability mass function of . is discrete or
continuous?
10
Example 3.1.7
A coin has 0.6 chance of coming up heads. This coin is tossed 4
times. Define a suitable random variable to find the probabilities of
following events. Find the probability mass function of that random
variable. Hence, calculate the probabilities of the following events.
i. Getting 3 heads
ii. Getting at least 2 heads
iii. Getting more than 1 head
iv. Getting at most 3 heads
11
Properties of a probability mass function
Let be a discrete random variable with probability mass
function . then,
• For any R,
• Let Then,
• Let be an event and Then,
12
Example 3.1.8
Let X be a random variable with the following probability
distribution.
i. Find the value of k.
ii. Calculate P(X≥1.75)
iii. Calculate P(2X+1<6), P(3+5>23)
iv. Let Y=2X+1. Find the p.m.f. of Y.
1 1.5 2 2.5 3
k 2k 4k 2k k
13
Exercise 3.1.9
The following table shows probability mass function. Find
value of
14
Example 1.3.10
A chemical supply company sells a certain chemical to customers in
5-lb lots. According to the past data, 20% of the customers have
bought 1 lot, 40% of the customers have bought 2 lots, 30% of the
customers have bought 3 lots and 10% of the customers have bought
4 lots.
Let be the number of lots bought by a randomly chosen customer.
Find the probability mass function of . is discrete or continuous?
Let be the total number of lots that will be bought by the next two
customers. Find the probability mass function of . Find the
probability that the total number of lots that the next two customers
will buy is more than 5.
15
Example 3.1.11
A coin has a chance 0.6 of coming up heads. This coin is tossed
repeatedly until a head comes up. Define a suitable random
variable to find the probabilities of following events. Find the
probability mass function of that random variable. Hence,
calculate the probabilities of following events.
i. The number of tosses required is 5
ii. The number of tosses required is at least 2
iii. The number of tosses required is more than 1
16
Example 3.1.12
The following function represent the probability mass
function.
i. Find the value of k.
ii. Find the following probabilities
17
Exercise 3.1.13
An appliance dealer sells three different models of freezers having 13.5, 15.9
and 19.1 cubic feet of storage space, respectively. The percentages of sales of
freezers of above sizes were 20%, 50% and 30% respectively.
Let be the amount of storage space of the freezer purchased by the next
customer to buy a freezer.
Find the probability mass function of . is discrete or continuous?
The profits from each of the above freezers are Rs. 1000, 1200 and 1600
respectively. If two freezers are sold per day, what is the probability that the
total profit per day will be greater than Rs. 2500?
18
Probability Density Function (pdf)
• Definition for continuous random variables.
• Probability density function (pdf) of a continuous random
variable is a function that describes the relative likelihood
for this random variable to occur at a given point.
3.2 Continuous Random Variable and Probability
Density Function
19
Properties of a probability density function
Let be a continuous random variable with probability density
function then,
• For any R,
• Let hen
• Let be an event and
20
Calculation of probability using pdf
Let R such that then,
21
• If is a continuous random variable with the p.d.f. ,
Then for any k R,
• Therefore, for a continuous random variable ,
22
Probability density functions have some parallel
characteristics as probability mass function.
23
Example 3.2.1
The reaction temperature in a certain chemical process is a continuous
random variable with the following density function.
i. Graph the pdf and verify that the above function is a proper
density function.
ii. Calculate How does this probability compare to
iii. Calculate
iv. Calculate
24
Example 3.2.2
Suppose is continuous random variable. The probability
density function of is,
i. Find the value of k
ii. Calculate
iii. Calculate
iv. Calculate
25
Example 3.2.3
A university lecturer never finishes his lecture before the end of the hour and
always finishes his lecture within 2 minutes after the hour. Let,
and suppose the pdf of is
i. Find the value of k and draw the density curve.
ii. What is the probability that the lecture ends within 1 minute of the
end of the hour?
iii. What is the probability that the lecture continues beyond the hour for
between 60 and 90 seconds?
iv. What is the probability that the lecture continues for at least 90
seconds beyond the end of the hour?
26
Exercise 3.2.4
For coming to work, I must take two buses. From the past experience, I know
that a bus can come at any time within 6 minutes. Also, the probability that a
bus comes within any period of the same length is the same. Hence, it is
reasonable to assume the following probability density function for the waiting
time W (in minutes) for a bus.
i. Verify that the above function is a proper density function
ii. What is the probability that the waiting time at the first bus-stop will be
less than 2 minutes?
iii. What is the probability that the waiting time at the first bus stop will be
less than 2 minutes and the waiting time at the second bus stop will be
greater than 2.5 minutes?
27
Exercise 3.2.5
The probability density function of the net weight in pounds of a
packaged chemical herbicide is
determine the probability that a package weighs more than 50
pounds.
to avoid unnecessary cost company decides to refill the 10% of
packets that have high net weight. find the maximum allowable
value for net weight.
28
Cumulative Distribution Function (cdf)
Definition:
The cumulative distribution function (cdf) of a random variable
is denoted by is defined as,
R
For a discrete random variable , the cdf is given by,
29
Example 3.2.6
Consider the pmf given below
i. Find the cdf of .
ii. Draw the cdf of
iii. Calculate.
30
Example 3.2.5
A consumer organization that evaluates new
automobiles customarily reports the number of major
defects in each car examined. Let denote the number
of major defects in a randomly selected car of a
certain type. The cdf of is as follows:
Calculate the following probabilities directly from the
cdf.
31
Cumulative Distribution Function (CDF)
• For a continuous random variable , the cdf is given by,
Where - the value of the pdf of at (Here is a dummy integration
variable)
• Conversely,
32
Example 3.2.8
Let be the distance between a point target and a shot
aimed at the point in a coin operated target game. Has
the following density function.
i. Find the cdf of .
ii. Compute using the cdf.
33
Example 3.2.9
The probability density function o is given by,
i. Find the cdf of W.
ii. Find
iii. Find
34
Exercise 3.2.10
“Time headway” in traffic flow is the elapsed time between the time that one
car finishes passing a fixed point and the instant that the next car begins to pass
point. Let be the time headway for two randomly chosen consecutive cars on a
highway during a period of heavy traffic flow. The following density function
has been suggested for .
i. Find the cdf of and draw it.
35
Exercise 3.2.11
The time until a chemical reaction is complete (in
milliseconds) is approximated by the cumulative distribution
function.
Determine the probability density function of . What
proportion of reaction is complete within 200 milliseconds?
36
Expected Value of a Random Variable
• A random variable takes many values, with different
probabilities.
• Sometimes we would like to represent those values
with a single number.
• Expectation of the random variable is a representative
of those values.
37
Definition - Expectation of a Discrete Random
Variable
Let be a discrete random variable with then we define it’s
expectation as,
Definition - Expectation of a function of a Discrete
Random Variable
Let be a discrete random variable with then the mean
(expected value) of any function is defined as,
38
Definition - Expectation of a Continuous Random
Variable
Let be a continuous random variable with then we define it’s
expectation as,
Definition - Expectation of a function of a Continuous
Random Variable
Let be a continuous random variable with then the mean
(expected value) of any function is defined as,
39
Variance of a Random Variable
Definition – variance of a random variable
Let be a random variable (discrete or continuous). Then, the
variance of is defined as,
The positive square root of is called the standard deviation of .
40
Properties of expectation and variance
41
Alternative formula for variance
42
Example 3.2.12
Consider the pmf given below.
Find
43
Example 3.2.13
The probability mass function of is defined as follows.
Find,
i. Value of
44
Exercise 3.2.14
The probability density function of is defined as follows.
Find,
i. Value of
45
*Example 3.2.15
Let be the distance between a point target and a shot aimed at the point in
a coin operated target game. Has the following density function.
Find
Exercise 3.2.16
Let X be a random variable and and are constants. Show that using the
definition of variance.
46
Example 3.2.17
A curd vendor has observed that 70% of the customers buy 1 container,
15% of the customers buy 2 containers, 10% of the customers buy 3
containers and 5% of the customers buy 4 containers.
Calculate the mean number of containers of curd bought by a randomly
chosen customer.
Example 3.2.18
Consider the following game. We toss a fair die twice. If the sum of the
two values is less than or equal to 3, we have to pay $10. If the sum is 4, 5
or 6 we pay $4. If the sum is 7, 8 or 9 we earn $4. If the sum is 10, 11 or
12 we earn $10. What’s our expected winning?

Chapter 3 - Probability - SBS 2203 Bio-Statistics - Part 1.pptx

  • 1.
    1 SBS2203 Bio-Statistics Chapter 3 3.1Random variable, Discrete random variable and Probability mass function 3.2 Continuous Random Variable and Probability Density Function 3.3 Special discrete probability distributions 3.4 Special continuous probability distributions
  • 2.
    2 3.1 Random variable,Discrete random variable and Probability mass function Definition Let be a sample space. Let be a function from to (i.e. ). Then is called a random variable. . . . . . Sample Space Induced Sample Space
  • 3.
    3 • A randomvariable assigns a real number to each outcome of the sample space. • The range of the random variable is called the “induced sample space”. • Two types of random variables: • Discrete random variable - induced sample space is countable. • Continuous random variable - induced sample space is not countable.
  • 4.
    4 Event in termsof random variable Example 3.1.1 Consider the experiment of tossing a coin. Express the following events using a suitably defined random variable.
  • 5.
    5 Example 3.1.2 Consider theexperiment of tossing a coin 10 times. Let be the event of getting number of heads. Write in terms of a suitably defined random variable. Example 3.1.3 Consider the experiment of weighing the yield (in pounds) obtained from a randomly selected chilly plant of a certain chilly plot. Consider the following events. Write the above events in terms of a suitably defined random variable.
  • 6.
    6 Example 3.1.4 Consider theexperiment of measuring the life time of a randomly selected bulb of a certain kind. Express the following events in terms of a suitably defined random variable.
  • 7.
    7 Example 3.1.5 Consider theexperiment of taking two products randomly from a production line and determine whether each is defective or not. Express the following events using a suitably defined random variable.
  • 8.
    8 Probability Mass Function(pmf) • The function that gives the probability of each possible value of a discrete random variable is called its probability mass function. • Suppose that is a discrete random variable. The probability mass function of random variable is defined by as follows: R • The pmf can be an equation, a table or a graph that shows how probability is assigned to possible values of the random variable.
  • 9.
    9 Example 3.1.6 Consider theexperiment of tossing a coin. Let, Find the probability mass function of . is discrete or continuous?
  • 10.
    10 Example 3.1.7 A coinhas 0.6 chance of coming up heads. This coin is tossed 4 times. Define a suitable random variable to find the probabilities of following events. Find the probability mass function of that random variable. Hence, calculate the probabilities of the following events. i. Getting 3 heads ii. Getting at least 2 heads iii. Getting more than 1 head iv. Getting at most 3 heads
  • 11.
    11 Properties of aprobability mass function Let be a discrete random variable with probability mass function . then, • For any R, • Let Then, • Let be an event and Then,
  • 12.
    12 Example 3.1.8 Let Xbe a random variable with the following probability distribution. i. Find the value of k. ii. Calculate P(X≥1.75) iii. Calculate P(2X+1<6), P(3+5>23) iv. Let Y=2X+1. Find the p.m.f. of Y. 1 1.5 2 2.5 3 k 2k 4k 2k k
  • 13.
    13 Exercise 3.1.9 The followingtable shows probability mass function. Find value of
  • 14.
    14 Example 1.3.10 A chemicalsupply company sells a certain chemical to customers in 5-lb lots. According to the past data, 20% of the customers have bought 1 lot, 40% of the customers have bought 2 lots, 30% of the customers have bought 3 lots and 10% of the customers have bought 4 lots. Let be the number of lots bought by a randomly chosen customer. Find the probability mass function of . is discrete or continuous? Let be the total number of lots that will be bought by the next two customers. Find the probability mass function of . Find the probability that the total number of lots that the next two customers will buy is more than 5.
  • 15.
    15 Example 3.1.11 A coinhas a chance 0.6 of coming up heads. This coin is tossed repeatedly until a head comes up. Define a suitable random variable to find the probabilities of following events. Find the probability mass function of that random variable. Hence, calculate the probabilities of following events. i. The number of tosses required is 5 ii. The number of tosses required is at least 2 iii. The number of tosses required is more than 1
  • 16.
    16 Example 3.1.12 The followingfunction represent the probability mass function. i. Find the value of k. ii. Find the following probabilities
  • 17.
    17 Exercise 3.1.13 An appliancedealer sells three different models of freezers having 13.5, 15.9 and 19.1 cubic feet of storage space, respectively. The percentages of sales of freezers of above sizes were 20%, 50% and 30% respectively. Let be the amount of storage space of the freezer purchased by the next customer to buy a freezer. Find the probability mass function of . is discrete or continuous? The profits from each of the above freezers are Rs. 1000, 1200 and 1600 respectively. If two freezers are sold per day, what is the probability that the total profit per day will be greater than Rs. 2500?
  • 18.
    18 Probability Density Function(pdf) • Definition for continuous random variables. • Probability density function (pdf) of a continuous random variable is a function that describes the relative likelihood for this random variable to occur at a given point. 3.2 Continuous Random Variable and Probability Density Function
  • 19.
    19 Properties of aprobability density function Let be a continuous random variable with probability density function then, • For any R, • Let hen • Let be an event and
  • 20.
    20 Calculation of probabilityusing pdf Let R such that then,
  • 21.
    21 • If isa continuous random variable with the p.d.f. , Then for any k R, • Therefore, for a continuous random variable ,
  • 22.
    22 Probability density functionshave some parallel characteristics as probability mass function.
  • 23.
    23 Example 3.2.1 The reactiontemperature in a certain chemical process is a continuous random variable with the following density function. i. Graph the pdf and verify that the above function is a proper density function. ii. Calculate How does this probability compare to iii. Calculate iv. Calculate
  • 24.
    24 Example 3.2.2 Suppose iscontinuous random variable. The probability density function of is, i. Find the value of k ii. Calculate iii. Calculate iv. Calculate
  • 25.
    25 Example 3.2.3 A universitylecturer never finishes his lecture before the end of the hour and always finishes his lecture within 2 minutes after the hour. Let, and suppose the pdf of is i. Find the value of k and draw the density curve. ii. What is the probability that the lecture ends within 1 minute of the end of the hour? iii. What is the probability that the lecture continues beyond the hour for between 60 and 90 seconds? iv. What is the probability that the lecture continues for at least 90 seconds beyond the end of the hour?
  • 26.
    26 Exercise 3.2.4 For comingto work, I must take two buses. From the past experience, I know that a bus can come at any time within 6 minutes. Also, the probability that a bus comes within any period of the same length is the same. Hence, it is reasonable to assume the following probability density function for the waiting time W (in minutes) for a bus. i. Verify that the above function is a proper density function ii. What is the probability that the waiting time at the first bus-stop will be less than 2 minutes? iii. What is the probability that the waiting time at the first bus stop will be less than 2 minutes and the waiting time at the second bus stop will be greater than 2.5 minutes?
  • 27.
    27 Exercise 3.2.5 The probabilitydensity function of the net weight in pounds of a packaged chemical herbicide is determine the probability that a package weighs more than 50 pounds. to avoid unnecessary cost company decides to refill the 10% of packets that have high net weight. find the maximum allowable value for net weight.
  • 28.
    28 Cumulative Distribution Function(cdf) Definition: The cumulative distribution function (cdf) of a random variable is denoted by is defined as, R For a discrete random variable , the cdf is given by,
  • 29.
    29 Example 3.2.6 Consider thepmf given below i. Find the cdf of . ii. Draw the cdf of iii. Calculate.
  • 30.
    30 Example 3.2.5 A consumerorganization that evaluates new automobiles customarily reports the number of major defects in each car examined. Let denote the number of major defects in a randomly selected car of a certain type. The cdf of is as follows: Calculate the following probabilities directly from the cdf.
  • 31.
    31 Cumulative Distribution Function(CDF) • For a continuous random variable , the cdf is given by, Where - the value of the pdf of at (Here is a dummy integration variable) • Conversely,
  • 32.
    32 Example 3.2.8 Let bethe distance between a point target and a shot aimed at the point in a coin operated target game. Has the following density function. i. Find the cdf of . ii. Compute using the cdf.
  • 33.
    33 Example 3.2.9 The probabilitydensity function o is given by, i. Find the cdf of W. ii. Find iii. Find
  • 34.
    34 Exercise 3.2.10 “Time headway”in traffic flow is the elapsed time between the time that one car finishes passing a fixed point and the instant that the next car begins to pass point. Let be the time headway for two randomly chosen consecutive cars on a highway during a period of heavy traffic flow. The following density function has been suggested for . i. Find the cdf of and draw it.
  • 35.
    35 Exercise 3.2.11 The timeuntil a chemical reaction is complete (in milliseconds) is approximated by the cumulative distribution function. Determine the probability density function of . What proportion of reaction is complete within 200 milliseconds?
  • 36.
    36 Expected Value ofa Random Variable • A random variable takes many values, with different probabilities. • Sometimes we would like to represent those values with a single number. • Expectation of the random variable is a representative of those values.
  • 37.
    37 Definition - Expectationof a Discrete Random Variable Let be a discrete random variable with then we define it’s expectation as, Definition - Expectation of a function of a Discrete Random Variable Let be a discrete random variable with then the mean (expected value) of any function is defined as,
  • 38.
    38 Definition - Expectationof a Continuous Random Variable Let be a continuous random variable with then we define it’s expectation as, Definition - Expectation of a function of a Continuous Random Variable Let be a continuous random variable with then the mean (expected value) of any function is defined as,
  • 39.
    39 Variance of aRandom Variable Definition – variance of a random variable Let be a random variable (discrete or continuous). Then, the variance of is defined as, The positive square root of is called the standard deviation of .
  • 40.
  • 41.
  • 42.
    42 Example 3.2.12 Consider thepmf given below. Find
  • 43.
    43 Example 3.2.13 The probabilitymass function of is defined as follows. Find, i. Value of
  • 44.
    44 Exercise 3.2.14 The probabilitydensity function of is defined as follows. Find, i. Value of
  • 45.
    45 *Example 3.2.15 Let bethe distance between a point target and a shot aimed at the point in a coin operated target game. Has the following density function. Find Exercise 3.2.16 Let X be a random variable and and are constants. Show that using the definition of variance.
  • 46.
    46 Example 3.2.17 A curdvendor has observed that 70% of the customers buy 1 container, 15% of the customers buy 2 containers, 10% of the customers buy 3 containers and 5% of the customers buy 4 containers. Calculate the mean number of containers of curd bought by a randomly chosen customer. Example 3.2.18 Consider the following game. We toss a fair die twice. If the sum of the two values is less than or equal to 3, we have to pay $10. If the sum is 4, 5 or 6 we pay $4. If the sum is 7, 8 or 9 we earn $4. If the sum is 10, 11 or 12 we earn $10. What’s our expected winning?