You are on page 1of 8

Name : Jericho Hyansalem Wicaksono

NRP : 5019201004
Course : Ship Maintenance
Lecturer : Ir. Dwi Priyanta, MSE
Assignment : Workbook 2 – Random Variables
1. The following is the list of “random experiments”. Determine what a random variable
is, its possible value, and its type (either discrete or continuous random variable).
Answer:
Before answering the questions, it is better to know and understand what a “random
variable” is, the meaning of possible value, as well as the difference between discrete and
continuous random variables.
A random variable is a variable that takes specific values with specific probabilities. It can
also be considered a variable whose value depends on the outcome or result of an uncertain
(random) event. For example, let X be the outcome of a dice roll. Then, X is a random
variable whose possible values are 1, 2, 3, 4, 5, and 6.
A random variable is called a “discrete random variable” if it has countably many possible
values. The word discrete means countable. For example, the number of students in a class
is countable, or discrete. The value could be 2, 24, 34, or 135 students, but it cannot be
233/2 or 12.23 students. If not, it is called “continuous random variables”. Continuous
random variables are usually measurements. For example, if the possible values are any of
these:
- {1, 2, 3, ….}
- {…, -2, -1, 0, 1, 2, ….}
- {0, 2, 4, 6, ….}
- Any finite set
then the random variable is discrete. If the possible values are any of these:
- All numbers between 0 and ∞
- All numbers between -∞ and ∞
- All numbers between 0 and 1

then the random variable is continuous.


For further example, the following quantities would typically be modeled as discrete
random variables:

- The number of defects in a batch of 20 items


- The number of people preferring one brand over another in a market research
study
- The credit rating of a debt issue at some date in the future

The following would be typically be modeled as continuous random variables:

- The yield on a 10-year Treasury Bond three years from today


- The proportion of defects in a batch of 10,000 items
- The time between breakdowns of a machine.
In conclusion, continuous, because the random variable has an infinite number of possible
outcomes and cannot be counted. Discrete, because the random variable is countable.

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.
𝑅𝑥 = {𝑥1 , 𝑥2 , 𝑥3 , … . }
Not that here 𝑥1 , 𝑥2 , 𝑥3 are possible values of the random variable X. For a discrete
random variable X, we are interested in knowing the probabilities of 𝑋 = 𝑥𝑘 . The
probabilities of events {𝑋 = 𝑥𝑘 } are formally shown by the probability mass function
(PMF) of X. Hence, for the discrete random variable X with range 𝑅𝑥 = {𝑥1 , 𝑥2 , 𝑥3 , … . }
the PMF of X will be:
𝑃𝑥 (𝑥𝑘 ) = 𝑃(𝑋 = 𝑥𝑘 )
For 𝑘 = 1, 2, 3, ….
[In this question, PMF will be denoted as f(T), not as 𝑃𝑥 (𝑥𝑘 )]

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:
𝑇 = {1, 2, 3, 4, 5, 6}
T is a discrete random variable, hence the function will be:
1
𝑓(1) = 𝑃(𝑇 = 1) =
6
1
𝑓(2) = 𝑃(𝑇 = 2) =
6
1
𝑓(3) = 𝑃(𝑇 = 3) =
6
1
𝑓(4) = 𝑃(𝑇 = 4) =
6
1
𝑓(5) = 𝑃(𝑇 = 5) =
6
1
𝑓(6) = 𝑃(𝑇 = 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:
𝐹𝑋 (𝑥) = 𝑃(𝑋 ≤ 𝑥)
For all 𝑥 ∈ ℝ
In general, if 𝑅𝑋 = {𝑥1 , 𝑥2 , 𝑥3 , … . }, we can write
𝐹𝑋 (𝑥) = ∑ 𝑃𝑋 (𝑥𝑘 )
𝑥𝑘 ≤𝑥
[In this question, CDF will be denoted as F(T), not as 𝐹𝑋 (𝑥)]

Hence, based on the information above, the relation between a random variable and
cumulative distribution function for a dice-tossing will be:
1
𝐹(1) = 𝑃(𝑇 ≤ 1) = 𝑃(1) =
6
2
𝐹(2) = 𝑃(𝑇 ≤ 2) = 𝑃(1) + 𝑃(2) =
6
3
𝐹(3) = 𝑃(𝑇 ≤ 3) = 𝑃(1) + 𝑃(2) + 𝑃(3) =
6
4
𝐹(4) = 𝑃(𝑇 ≤ 4) = 𝑃(1) + 𝑃(2) + 𝑃(3) + 𝑃(4) =
6
5
𝐹(5) = 𝑃(𝑇 ≤ 5) = 𝑃(1) + 𝑃(2) + 𝑃(3) + 𝑃(4) + 𝑃(5) =
6
6
𝐹(6) = 𝑃(𝑇 ≤ 6) = 𝑃(1) + 𝑃(2) + 𝑃(3) + 𝑃(4) + 𝑃(5) + 𝑃(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.
3. A probability density function (PDF) is defined by the following equation.
𝟎. 𝟎𝟖𝒕 𝟎≤𝒕≤𝟓
𝒇(𝒕) = {
𝟎 𝒇𝒐𝒓 𝒐𝒕𝒉𝒆𝒓𝒔
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 𝑓(𝑥) such that for any 𝑐 ≤ 𝑑 we have:
𝑑
𝑃(𝑐 ≤ 𝑋 ≤ 𝑑) = ∫ 𝑓(𝑥)𝑑𝑥
𝑐

The function 𝑓(𝑥) is called the probability density function (PDF).


The cumulative distribution function (CDF) of a continuous random variable X is defined
in exactly the same was as the CDF of a discrete random variable, which is:
𝐹𝑋 (𝑏) = 𝑃(𝑋 ≤ 𝑏)
Then, when you go to calculate it you can use:
𝑏

𝐹𝑋 (𝑏) = 𝑃(𝑋 ≤ 𝑏) = ∫ 𝑓(𝑥)𝑑𝑥


−∞

Hence, based on the information above, the CDF of this function, will be:

𝑡
𝐹(𝑡) = ∫ 𝑓(𝑡)𝑑𝑡
−∞

If 𝑡 < 0; 𝑓(𝑡) = 0

0
𝐹(𝑡) = ∫ 𝑓(𝑡)𝑑𝑡 = 0
−∞

If 0 ≤ 𝑡 ≤ 5; 𝑓(𝑡) = 0.08𝑡

𝑡 𝑡
1 2 𝑥 1 2
𝐹(𝑡) = 𝐹(0) + ∫ 𝑓(𝑢)𝑑𝑢 = 0 + ∫ (0.08𝑢)𝑑𝑢 = 𝑢 │0 = 𝑡
0 0 25 25
In other words,
1 2
𝐹(𝑡) = 𝑡
25
If 0 ≤ 𝑡 ≤ 5
Hence, the F(t) for each t values will be:
1
𝐹(0) = (0)2 = 0.00
25
1
𝐹(1) = (1)2 = 0.04
25
1
𝐹(2) = (2)2 = 0.16
25
1
𝐹(3) = (3)2 = 0.36
25
1
𝐹(4) = (4)2 = 0.64
25
1
𝐹(5) = (5)2 = 1.00
25
The CDF for this function therefore can be plotted as shown in the figure below.

You might also like