Monday, July 4, 2016

Suppose you have the following distribution

x = 0, 2, 5
p(x) = 1/4, 1/4, 1/2

find the mean and variance.
To get the mean you take the sum of x(P(x))
so for x = 0, 1,5 with P(x) = 1/4, 1/4, and 1/2
You get 0(1/4) + 1(1/4) + 5(1/2) = 0 + 1/4 + 5/2 = 2.75
To calculate sigma squared (variance)
It's the [sum (x- mean)^2P(x)]/n
So we have (0 - 2.75)^2 + (2-2.75)^2 + (5-2.75)^2
The equals 7.5625 + 0.5625 + 5.0625 = 13.1875
now take 13.1875/3 = 4.396
For a sample size of two you can have these possibilities (0,0), (0,2), (0,5), (2,0), (2,2), (2,5), (5,0), (5,2), (5,5)
The means are the two numbers added and divided by two. That gives us
(0 + 0)/2 = 0
(0 + 2)/2 = 1
(0 + 5)/2 = 2.5
(2 + 0)/2 = 1
(2 + 2)/2 = 2
(2 + 5)/2 = 3.5
(5 + 0)/2 = 2.5
(5 +2)/2 = 3.5
(5 + 5)/2 + 5
So you can have mean of 0 with (0, 0) with probability (1/4)(1/4) = 1/16
mean of 1 with (0, 2) and (2,0) with probability 2(1/4)(1/4) = 1/8
mean of 2 with (2, 2) with probability of (1/4)(1/4) = 1/16
mean of 2.5 with (0,5) and (5,0) with probability of 2(1/4)(1/2) = 1/4
mean of 3.5 with (2,5) and (5,2) with probability of 2(1/4)(1/2) = 1/4
mean of 5 with (5,5) with probability of (1/2)(1/2) = 1/4

No comments:

Post a Comment