Workbook 2
Workbook 2
NRP : 5019201004
Course : Ship Maintenance
Lecturer : Ir. Dwi Priyanta, MSE
Assignment : Workbook 2 – Random Variables
Hence, based on the above information, we can fill these tables with:
Random
No. Random Variable (RV) Possible Value Type
Experiment
A voice
communication
0 External Lines
system for a
The quantity of external 1 External Lines
business contains
lines that are being used 2 External Lines Discrete Random
48 external lines.
1 when the system is 3 External Lines Variable (Countable
At a particular
observed at the 48 External Lines Variable)
time, the system is
particular time or
observed, and
X={0, 1, 2, …., 48}
some of the lines
are being used.
In a printed circuit
board fabrication, 0 connections
there are 1000 1 connections
The quantity of the Discrete Random
solder connections. 1000 connections
2 nonconforming solder Variable (Countable
We interest in the or
connections Variable)
number of X={0, 1, 2, ....,
nonconforming 1000}
solder connections.
The values of
In a certain raw percentage is
material known from 0 to
processing, it is 100% and because
interested to the moisture is
The quantity of moisture Discrete Random
measure moisture measured to the
3 content in nearest Variable (Countable
content. The nearest
percentage point Variable)
moisture is percentage point,
measured to the it means the
nearest percentage values are
point. rounded, hence:
X={0, 1, 2, ….100}
Since we are
testing 10,000
people, the
number of people
who carry the
A group of 10,000 gene could be
people are tested anywhere from 0
for a gene called The quantity of number to 10,000. Discrete Random
4 Ifi202 that has of people who carry the Therefore, the set Variable (Countable
been found to gene Ifi202 of all possible Variable)
increase the risk outcomes for this
for lupus. random variable is
the set of all
integers from 0 to
10,000. Hence,
X={0, 1, 2,…,
10.000}
An order for an
automobile can 0 is base model,
The quantity of an Discrete Random
select the base hence there are
5 automobile model Variable (Countable
model or add any 16 outcomes or:
selections Variable)
number of 15 X={0, 1, 2, 3, .., 15}
options.
Continuous Random
Variable (Because we do
In steel pipe not know the amount of
production, a pipe the pipe and there are
can bear stress infinite amount of
6 The stress load of the 34900 ≤ X ≤ 35100
load between possibilities or outcome
34900 psi and for the pipe to bear
35100 psi stress load between
34900 and 35100 psi (e.g.
34913.67890 psi)
Continuous Random
Variable (Because we do
A group of pumps not know the amount of
were observed, the the pumps and there are
The maximum lifetime of
7 maximum lifetime 0 ≤ X ≤ 23745 infinite amount of
the pumps' impellers
of their impellers possibilities or outcome
was 23745 hours. for the lifetime of their
impellers (e.g. 23630.23
hours)
Continuous Random
In copper wire
Variable (Because there
production, the
The current (ampere) are infinite amount of
wire will pass the
8 that can be electrified for 0 ≤ X ≤ 20 possibilities or outcome
test if it can be
the copper wire for the current that can
electrified up to 20
be electrified to the wire
Ampere
(e.g. 17.34 A)
2. In a tossing dice trial, let T is a random variable that represents the outcome of the
trial. Find the relation between a random variable and probability mass function (T
and f(T)) as well as a random variable and cumulative distribution function (T and
F(T)). Hint: show the relation in the cartesian axis.
Answer:
a.) Relation between a random variable (T) and probability mass function (f(T))
First, we must know the relation between discrete random variables with probability
mass function. If X is a discrete random variable then its range Rx is a countable set,
so the elements can be list in Rx.
R x ={x 1 , x 2 , x 3 , … .}
Not that here x 1 , x 2 , x 3 are possible values of the random variable X. For a discrete
random variable X, we are interested in knowing the probabilities of X =x k. The
probabilities of events { X=x k } are formally shown by the probability mass function
(PMF) of X. Hence, for the discrete random variable X with range
R x ={x 1 , x 2 , x 3 , … .} the PMF of X will be:
P x ( x k )=P ( X=x k )
For k = 1, 2, 3, ….
[In this question, PMF will be denoted as f(T), not as P x ( x k )]
Hence, for this question, let T (random variable) to be the outcome of the dice-tossing
trial (one time dice-tossing only), hence the possible values are:
T ={1 , 2 ,3 , 4 , 5 ,6 }
T is a discrete random variable, hence the function will be:
1
f ( 1 ) =P ( T =1 ) =
6
1
f ( 2 ) =P ( T =2 ) =
6
1
f ( 3 )=P (T =3 )=
6
1
f ( 4 ) =P ( T =4 ) =
6
1
f ( 5 )=P (T =5 )=
6
1
f ( 6 )=P ( T =6 )=
6
To better visualize the PMF, the function can be plotted as the figure shown below.
b.) Relation between a random variable (T) and cumulative distribution function
(F(T))
Before answering this question, we must know and understand the relation between
CDF and a random variable. Let X to be the random variable. Hence, the CDF of
random variable X is defined as:
F X ( x ) =P( X ≤ x )
For all x ∈ R
In general, if R X ={x 1 , x 2 , x 3 , … .} , we can write
F X ( x ) = ∑ P X (x k )
xk ≤ x
Hence, based on the information above, the relation between a random variable and
cumulative distribution function for a dice-tossing will be:
1
F ( 1 )=P ( T ≤ 1 )=P ( 1 )=
6
2
F ( 2 )=P ( T ≤ 2 )=P ( 1 ) + P(2)=
6
3
F ( 3 ) =P ( T ≤3 )=P (1 ) + P ( 2 ) + P(3)=
6
4
F ( 4 ) =P ( T ≤ 4 )=P ( 1 ) + P ( 2 )+ P ( 3 ) + P(4)=
6
5
F ( 5 ) =P ( T ≤5 ) =P ( 1 ) + P ( 2 ) + P (3 )+ P ( 4 ) + P(5)=
6
6
F ( 6 )=P ( T ≤ 6 )=P ( 1 ) + P ( 2 ) + P ( 3 ) + P ( 4 )+ P ( 5 )+ P( 6)=
6
We can plot it as shown in the figure below.
The figure above is generated using Analyse-it (Trial Version) add-in on Microsoft
Excel. The probability is F(T) and T is the outcome of the dice-tossing.
{
f ( t )= 0.08 t 0 ≤ t ≤ 5
0 for others
Find the cumulative distribution function (CDF)
Answer:
First, we must know that probability density function (PDF) is for continuous
distributions and probability mass function (PMF) is for discrete distributions. Therefore,
it can be concluded that this is a continuous distribution or continuous random variable. A
random variable X is continuous if there is a function f ( x) such that for any c ≤ d we
have:
d
P ( c ≤ X ≤ d )=∫ f ( x ) dx
c
t
F ( t )= ∫ f ( t ) dt
−∞
If t <0 ; f ( t )=0
0
F ( t )= ∫ f ( t ) dt=0
−∞
If 0 ≤ t ≤ 5; f ( t ) =0 .08t
t t
1 2 x 1 2
F ( t )=F ( 0 )+∫ f ( u ) d u=0+∫ (0.0 8 u)d u= u │0 = t
0 0 25 25
In other words,
1 2
F ( t )= t
25
If 0 ≤ t ≤ 5
Hence, the F(t) for each t values will be:
1 2
F ( 0 )= ( 0 ) =0.00
25
1 2
F ( 1 )= (1 ) =0.04
25
1
F ( 2 )= ( 2 )2=0.16
25
1
F ( 3) = ( 3 )2=0.36
25
1
F ( 4) = ( 4 )2=0.64
25
1
F ( 5) = ( 5 )2=1.00
25
The CDF for this function therefore can be plotted as shown in the figure below.