4.1 - Random Variables

Population - {A,B,C,D,E,F}
Interest - proportion of vowels in population
Sampling method - SRS with n=3

Important Questions
p^ P(p^)
0 420
13 1220
23 420

The first two questions are basic questions to inferential statistics, but the last two, are what we're going to develop in the next chapters

Random Variable

Definition

Consider a random experiment and its sample space
Determine a method for assigning a numerical value to each outcome in the sample space
Identify the possible values:

Based on that, the table in the Important Questions has the random variable marked as p^, which is discrete (16 is not possible for example)

Discrete Random Variables

Exercise 1

Rolling two fair, six-sided dice and construct the porbability distributions of the random variables using the following numerical assignment methods.

Sum of the two dice
X P(X)
2 136
3 236
4 336
5 436
6 536
7 636
8 536
9 436
10 336
11 236
12 136

X can take on integer values in [2,12] so it is a discrete random value

Max of the Two Dice
Y P(Y)
1 136
2 336
3 536
4 736
5 936
6 1136
Excercise 2

Population - {A,B,C,D}
Interest - proportion of vowels in population
Sampling method - i.i.d. random sampling with n=2

Probability Distribution
Z P(Z)
0 916
12 616
1 116

p=14
Probability that sample is over-representative - 716
Probability that sample is unbiased - 0

Uniform Distributions

Uniformly Distributed Random Variables

  • A discrete random variable is uniformly distributed if every possible value is equally likely
  • A continuous random variable is uniformly distributed if every possible value has the same probability

Uniform Discrete Random Variables
Example experiment - throwing a fair dice
Determine the probability of each possible value for a uniform, discrete random variable with n possible values: $$P(A=a_{i}) = \frac{1}{n}$$

Expected Value

The expected value of a discrete random variable is the balancing point of the probability distribution (mean)

E(X)=μ=xP(X=x)

Expected value and mean are used interchangeably when discussing random variables
Caution: interpretation is important

Example

Construct a uniform, discrete random variable with 4 possible values such that the expected value is equal to 5
{3,4,6,7}
μ=3+4+6+74=5
Construct a discrete random variable that is not uniformly distributed with 5 possible values such that the expected value is equal to 5

X P(x=X) XP(x=X)
20 0.05 1
16 0.25 4
8.57 0.35 3
-6.7 0.15 -1
-10 0.2 -2
SUM 1 5

Variance and Standard Deviation

Recall that the variance of a population data set was the average of the square deviations from the mean

Definition

The variance of a discrete random variable is defined as the expected value of the square deviations from the mean $$Var(X) = \sigma^2 = \sum(x-\mu)^2 \cdot P(X=x)$$

The standard deviation, as always, is the square root of the variance $$\sigma = \sqrt{ \sigma^2 }$$
Interpretation again is key
The variance of a random variable is the long-term variance - it describes what will happen if we repeatedly run the experiment and analyze the results by computing the variance

X P(X=x) (Xμ)2 (Xμ)2P(X=x)
3 19 (35)2=4 419=49
4 29 (45)2=1 129=29
5 39 (55)2=0 039=0
6 29 (65)2=1 129=29
7 19 (75)2=4 419=49
μ=5 σ2=129=43

σ=43=233