13 Introduction to Random Variable and its Properties
Dr. Harmanpreet Singh Kapoor
Learning Objectives
- Introduction
- Random Variable
- Types of Random Variable
- Probability Distribution Function
- Mathematical Expectation
- Summary
- Suggested Readings
1. Learning Objectives
The main objective of this module is first to define the random variable. Then we will define the behavior and properties related to the random variable. Some introduction to probability distribution is given so that one can understand the relationship between random variable and distribution functions. Some properties like mathematical expectation by using related mathematical formulation and examples are also discussed.
2. Introduction
Mostly, an experimenter has an interest in those outcomes that occurs in a random experiment then the next question that arises how to compute them i.e. computation of these outcomes. Probability definition and probability concepts are used to find these outcomes and their numerical measure in terms of probability.
If an experimenter is only interested in number of outcomes in a random experiment and computation of number of outcomes instead of type of outcomes, then both random variable and probability distribution concepts are used.
Suppose n dice are thrown in a random manner, the experimenter want to know about the sum of coming points on the faces of the dice. These types of problems are solved by probability concepts and definitions which have been already discussed previously in the modules related with probability.
Suppose n coins have been tossed randomly, the experimenter is interested in to find out the number of tails obtained while tossing a coin. When such type of event occurs, experimenter has an interest in association of random numbers to these upcoming outcomes. The association of random number to the each outcome is known as random process and random association is known as random variable. Distribution of random variable and its probability is defined as probability distribution. Probability Distribution will be used to find probability and other properties of random variable like mean, median, variance, moment generating function etc. Sometimes random variables are used several times, to make these random variable useful for practical purposes, then mathematical expectation is used.
Suppose A businesses man wants to know his average profit on a commodity, a cancer specialist doctor wants to know his average number of patients diagnose with successful treatment, mathematical expectations are used to solve these types of problems. Random variable, probability distribution and mathematical expectation are the most important terms that are used in the probability theory. These terms are also used in programming language to find out the characteristics of the data. In programming languages, these type of properties are defined as summary of the data. In summary many properties of the data are included like variance, mean (expectation), mode, median, quantiles, quartiles, minimum value and maximum values.
Let’s discuss more in detail about random variable, probability distribution and mathematical expectation. In the next section, we first define the random variable and its mathematical expression. After that different types of random variables are also discussed.
3. Random Variable
One thing will strike in your mind when you listen the word random variable first time. One may assume that the random variable is a variable that is not absolutely correct. One can have controversy with its name. Random variable is a function instead of just a variable. Function is relation between two well defined sets, one set is known as domain and second one is range. Similarly, random variable is relation between two sets, one is set of possible outcomes i.e. sample space and second one is subset of real number. Set of possible outcomes is known as domain and subset of real number is known as range.
“Random Variable is a function whose domain is a set of possible outcomes and range is a subset of the set of real number”.
Random Variable is normally denoted by capital letter like ?, ?, ?, ?, ?, ? ….etc. and outcome of random variable is denoted by small letters like ?, ?, ?, ?, ?, ?, , ? …etc.
3.1 Mathematical expression:
Say ? be a real number connected with the outcome of a random experiment ?, ? be a sample space of the random experiment ? and ? represents the each outcome of the experiment ? that comes from sample space ?. ?(?) represents the real number to each outcome ?, is known as random variable. “A random variable ?(?) is a function whose domain is sample space ? and range is the subset of set of real number (-∞,∞)”.
For example: Tossing a coin three times at random is a random experiment (E). Let us define random variable as a function for counting the number of heads (0, 1, 2, 3) or to count the number of tails (0,1,2,3) or to count the number of head/tail appears at first place in a random experiment (E). Here we define the random variable as a function to count the number of heads (0, 1, 2, 3) that occurs in an experiment.
? = {???, ???, ???, ???, ???, ???, ???, ???}
Each outcome of the sample space is represented by ?. Random variable ?(?) is:
When number of head is equal to 0; random variable X(z) = 1.
When number of head is equal to 1; random variable X(z) = 3.
When number of head is equal to 2; random variable X(z) = 3.
When number of head is equal to 3; random variable X(z) = 1.
Remarks:
Linear function of the random variable is also a random variable. Suppose X and Y are two random variables. Following three linear functions of two the random variable are also random variable.
2? + 5?; ??; ? + ?.
If X is a random variable then
i) 1/?
ii) |?|
iii) max (?1, ?2)
iv) min(?1, ?2)
are also random variables.
A continuous and increasing functions of a random variable are also random variable.
4. Types of Random Variable
Suppose the number of students in a class is 50 that shows whole number and height of students that may lie in some interval because it may be 4.5 or 6.1 or 5.5 inch. According to examples, A random variable may be associated with either a finite countable number (as well as infinite countable) i.e. discrete value or in finite uncountable interval i.e. continuous values. Random variable is classified as of two types first is discrete and second one is continuous values of variable.
4.1 Discrete random variable
Discrete data means integer data that mean it does not include decimal values and considered only whole values. Discrete values can be positive or negative. For example: ±1, ±2, …
“Discrete random variable is a random variable which assume only finite and countable values”. List of some examples of discrete random variable:
- Number of phone calls in a day.
- Number of road accidents in a day.
- Number of claims in a day.
- Number of job seekers for a data scientist job.
- Number of grammatical errors in a text.
- Number of customers in a show room.
- Number of defective products in a manufacturer company.
- Number of produced products by a manufacturer company.
4.2 Continuous random variable:
Continuous data means real numbers that include decimal values. Continuous values are like as 2.3, 5.6, 9.8, 8.7…. or any value in any interval (1, 3), (7,9)…..etc. These interval may contain infinite values between interval limits.
“Continuous random variable is a random variable which can take any value in a given interval”.
List of some examples of continuous random variable:
- Closing price of share market.
- Temperature of metropolitan cities on a particular day.
- Distance travelled by a truck driver.
- Time taken by a bus service in traveling from Jaipur to Bathinda.
5. Probability Distribution Function
Frequency Distribution is used to arrange repetitive data in an appropriate manner. For example: claims reported each day for one week is given as:
0, 1, 2, 1, 3, 4, 1, 0, 2, 5, 4, 3, 7, 6, 6, 5, 2, 4
This data set have repetition of some values. In this data set 0 occurred 2 times, it means frequency of 0 is 2. Frequency denotes the number of data values occur. Another representation of the data set is called frequency distribution.
This frequency distribution shows the distribution between frequencies shared in the data set values. Probability distribution shows the distribution between probabilities and data values like frequency distribution.
For example: Tossing a coin two times and random variable ? denotes the number of heads, Probability distribution of ? is given as:
Graphical representation:
The graphical representation of probability mass function of the random variable is given in the Figure
Figure 1
From the Figure 1, we can see that on the x-axis we have discrete point 2,3,…,11 and on the y-axis the corresponding probabilities are given. So if add up all the probabilities the sum should be equal to one.
Graphical representation of Distribution function for the discrete random variable is presented in the Figure 2
Some question with solutions are given here for better understanding.
Question 1
Two dice are rolled. Let X be a random variable which is sum of upturned faces is even.
1. Construct probability distribution table.
2. Find the distribution function of X for 1 i.e. F(1).
Answer:
Two dice are rolled in a random experiment.
Sample space is:
S ={(1,1),(1,2),…..,(1,6),(2,1),(2,2),…..,(2,6),(3,1),(3,2),……,(3,6),(4,1),(4,2),…..,(4,6), (5,1),(5,2),…….,(5,6),(6,1),(6,2),…..,(6,6)}
Random variable X is given as:
Discrete distribution function of X chart is given as:
Figure 3
Bar chart of probability function of X variable’s is given as:
Figure 4
Probability Density Function:
If X be a continuous random variable and z outcomes comes from (a, b) interval, area under this interval will be called as probability density function (pdf). Probability Density Function or pdf of X will be shown as ??(?):
Continuous distribution function:
If X is a continuous random variable with pdf f(z), the function is :
6. Mathematical Expectation
Once PDF for the random variable is determined, often one wants to compute expected value or average value of random variable. Expected value for a discrete random variable is a weighted average, where weight is the probabilities to the associated random variable values.
Mathematical expression for the expected value of discrete random variable X with Probability mass function (pmf) f(z):
Note: Expected value for the random variable exist of right hand side of mathematical expression is convergence i.e. finite value of the variable exists.
Properties of Expectations:
1) Expected value of function of random variable is same as the expected value of the random variable.
Mathematical expression for the expected value of function of discrete random variable ?(?) is given as:
2) If the expectation of two random variable X and Y exists, expectation of addition of two random variable is equal to addition of expectation of respective two random variable.
Mathematical expression is given as:
?(? + ?) = ?(?) + ?(?).
This property also holds for function of random variable.
3) If the expectation of two random variable X and Y exists, expectation of multiplication of two random variable is equal to multiplication of expectation of respective two random variable.
Mathematical expression is given as:
This property also holds for function of random variable.
?(??) = ?(?)?(?).
4) Expectation of any constant is equal to the constant. Let us suppose ? is any constant value then mathematical expression is given as:
?(?) = ?.
5) Expectation of linear combination of random variable or function of random variable is given as:
?(?? + ?) = ??(?) + ?
where a and c are two constants and X is a random variable.
Moments:
Moments are used to find basic calculations of mathematical statistics and probability distribution like mean, variance, skewness and kurtosis.
Mean is first central about mean, variance is a second central moment about mean, skewness is ratio of square of third central moment to cube of second central moment about mean and kurtosis is ratio of fourth central moment to square of second central moment about mean.
Mathematical expressions for the moments are given as:
The rth central moment about mean of a variable X given as:
Variance:
Variance is used to find variability in the data. Variance is also called the second central moment. Variance can be defined in the term of expectation. The mathematical form of variance of variance is given as:
?(?) = ?(?2) − (?(?))2
If ? and ? are two constants, variance of linear function given as:
?(?? + ?) = ?2?(?)
Variance is affected by change of scale but not affected by change of origin.
Question 4
Let X he a random variable with the following pdf:
?(?) = 3?2; ??? 0 < ? < 1
Find ?(?)and ?(?).
Answer
Since mathematical expression for Expectation of continuous random variable is given as:
After putting limits on integration of function:
?(?) = 0.4125.
Hence ?(?) is 0.75 and ?(?) is 0.4125.
In this section, we discussed mathematical expectations of a random variables. Moments and their mathematical forms are also discussed. Some solved questions are included for better understanding.
7. Summary
In this module, we first give an introduction to random variable. Two types of random variables are also discusses with examples. A function is said to be probability mass function, probability distribution function and distribution function of random variables if it satisfies some conditions and these conditions are explained in detail. Also mathematical expectation of the random variables are also discussed.
8. Suggested Readings
Agresti, A. and B. Finlay, Statistical Methods for the Social Science, 3rd Edition, Prentice Hall, 1997.
Daniel, W. W. and C. L. Cross, C. L., Biostatistics: A Foundation for Analysis in the Health Sciences, 10th Edition, John Wiley & Sons, 2013.
Hogg, R. V., J. Mckean and A. Craig, Introduction to Mathematical Statistics, Macmillan Pub. Co. Inc., 1978.
Meyer, P. L., Introductory Probability and Statistical Applications, Oxford & IBH Pub, 1975.
Stephens, L. J., Schaum’s Series Outline: Beginning Statistics, 2nd Edition, McGraw Hill, 2006.
Triola, M. F., Elementary Statistics, 13th Edition, Pearson, 2017.
Weiss, N. A., Introductory Statistics, 10th Edition, Pearson, 2017.
you can view video on Introduction to Random Variable and its Properties |
One can refer to the following links for further understanding of the statistics terms.
http://biostat.mc.vanderbilt.edu/wiki/pub/Main/ClinStat/glossary.pdf
http://www.stats.gla.ac.uk/steps/glossary/alphabet.html
http://www.reading.ac.uk/ssc/resources/Docs/Statistical_Glossary.pdf
https://stats.oecd.org/glossary/
http://www.statsoft.com/Textbook/Statistics-Glossary
https://www.stat.berkeley.edu/~stark/SticiGui/Text/gloss.htm