# New to stats. Need help.

##### New Member
Alright this is a question from my stats class, I'm sure most will find it basic , however im not sure if i'm on the right track or completely off.

Show that: ∑i-n (Xi-Xbar)^2 = ∑i-n Xi^2-nXbar^2

Would I use the formula for the sample mean to then prove this, or is that not right.

Any help would be appreciated .

p.s. sorry for the horrible notation, i'm not exactly sure where to find the proper symbols.

#### dmmarathe

##### New Member
variance = Sum Xsq/n - (Xav.) Sq = Sum ( Xi - Xav.)Sq
Expanding you will get this.

#### vinux

##### Dark Knight
Alright this is a question from my stats class, I'm sure most will find it basic , however im not sure if i'm on the right track or completely off.

Show that: ∑i-n (Xi-Xbar)^2 = ∑i-n Xi^2-nXbar^2

Would I use the formula for the sample mean to then prove this, or is that not right.

Any help would be appreciated .

p.s. sorry for the horrible notation, i'm not exactly sure where to find the proper symbols.
Yes.. you may have to use the sample mean formula
Xbar = ∑i-n (Xi) / n ie n Xbar = ∑i-n (Xi)
& this one also
(a-b)^2 = a^2 -2ab +b^2

##### New Member
Great! thanks for the replies.

So then would I have?:

n Xbar = ∑i-n (Xi)

nXbar^2=∑i-n (Xi)^2

0=∑i-n (Xi)^2-n Xbar^2

=∑i-n (Xi-nXbar)^2

#### vinux

##### Dark Knight
nXbar^2=∑i-n (Xi)^2
How did you come up with this ?

∑i-n (Xi-Xbar)^2 = ∑i-n { Xi^2 -2Xi Xbar + Xbar^2 } [ expansion of (a+b) ^2 ]

= ∑i-n Xi^2 - 2 Xbar ∑i-n Xi + ∑i-n Xbar^2
= ∑i-n Xi^2 - 2 Xbar [ nXbar] + nXbar^2
=∑i-n Xi^2 - nXbar^2

##### New Member
To be honest I dont know, I figured in order to make it equivalent to the first equation that would be the way to go. Any suggestions?

Great Thanks! I had started off simply expanding it as you orginally said (a-b)= a-b)^2 = a^2 -2ab +b^2 however I didnt think of using the sample mean equation, so again thanks for pointing that out

Last edited:

#### vinux

##### Dark Knight
If you wanted to remember this for long time. Try to solve this using some example.. this will give more insight of the calculation.

ex: X1=5, X2 =2 ,X2 =1 here n = 3

##### New Member
If It isnt too much trouble, I had one more question.

Consider a transformed variable Wi, where Wi=a+bXi. Calculate the sample mean and variance of Wi, in terms of the sample mean and variance of Xi.

So in terms of Xi, we would have Xi=Wi-a/b

So if we take the sample mean formula Xbar= ∑i-n Xi/n, and replace Xi with Wi, is that what the question is asking for or is it something completely different.?

If you wanted to remember this for long time. Try to solve this using some example.. this will give more insight of the calculation.

ex: X1=5, X2 =2 ,X2 =1 here n = 3
Good idea, I'm going to do that.

#### vinux

##### Dark Knight
You may have to bit careful on your algebra.. Does Wi=a+bXi. implies
Xi=Wi-a/b ? or Xi=(Wi-a)/b?

Hint:

Sample mean of Wi = 1/n * ∑i-n Wi
Now replace Wi in terms of Xi and finally you will get answer in terms of Xbar..

Similar expression for the Variance. of Wi

##### New Member
∑i-n(Xi-Xbar)^2 = ∑i-n { Xi^2 -2Xi Xbar + Xbar^2 )

= ∑i-n Xi^2 - 2 Xbar ∑i-n Xi + ∑i-n Xbar^2
= ∑i-n Xi^2 - 2 Xbar [ nXbar] + nXbar^2
=∑i-n Xi^2 - nXbar^2

Sorry I just had one more question about this, I understand every transformation except in step one we had ∑i-n Xbar^2 and in step 2 this became nXbar^2, could you clarify this for me.

Im sure this is annoying but I would appreciate it .

#### vinux

##### Dark Knight
∑i-n Xbar^2 = { Xbar^2 + Xbar^2+ ... (n times )+Xbar^2 }
= n Xbar^2

{ remember algebra .. K + K+ K = 3K }

##### New Member
Vinux, you have been a great help thank you. One more thing, to you what does d= 1/n* ∑i-n (Xi-Xbar) equal to? Personally I was thinking it would be the mean deviation?

#### vinux

##### Dark Knight
If there is absolute function.. then you are right.. MD
Mean Deviation = 1/n* ∑i-n |(Xi-Xbar)| or 1/n* ∑i-n ABS(Xi-Xbar)

Otherwise 1/n* ∑i-n (Xi-Xbar) will be zero..

##### New Member
Vinux, I have another question for you if you dont mind.

Suppose {Aj}j-m is a collection of mutally exclusive, collectively exhaustive events in the sample space, and let B an event with P(B) >0. Show that ∑j-m P(Aj|B)=1.

Alright so I'm thinking P(Aj|B)= P(Aj∩ B)/P(B)

And since they are mutually exclusive A∩ B= 0?

Also, since they are collectively exhaustive AUB=S=1?

#### vinux

##### Dark Knight
He A1, A2, A3 ...Am make the partition. Aj's are mutually exclusive.

But Aj's and B are not exclusive..
See the diagram below

In this E1 and E2 you can consider as Ajs . And E is B

##### New Member
Ok that makes sense, I'm thinking then..

(A1∩B)U(A2∩B)U...U(Aj∩B)=1. I feel like their is a more formal way of proving this however.

#### vinux

##### Dark Knight
it will be
(A1∩B)U(A2∩B)U...U(Aj∩B)=B

##### New Member
Alright so then to relate it back the original equation

∑j-m P(Aj|B)=1.

We have ∑j-m (A∩B)=B? So then how do we relate the two.

#### BGM

##### TS Contributor
Vinux, I have another question for you if you dont mind.

Suppose {Aj}j-m is a collection of mutally exclusive, collectively exhaustive events in the sample space, and let B an event with P(B) >0. Show that ∑j-m P(Aj|B)=1.

Alright so I'm thinking P(Aj|B)= P(Aj∩ B)/P(B)

And since they are mutually exclusive A∩ B= 0?

Also, since they are collectively exhaustive AUB=S=1?
From the question,
Ai∩Aj = ∅ for i ≠ j
∪Aj = Ω (union over all Aj)
Therefore, Ai∩B and Aj∩B are mutually exclusive also, for i ≠ j
For any mutually exclusive events Ai∩B and Aj∩B, for i ≠ j,
Pr{Ai∩B} + Pr{Aj∩B} = Pr{(Ai∩B)∪(Aj∩B)}
By De Morgan's Law,
(Ai∩B)∪(Aj∩B) = (Ai∪Aj)∩B

Therefore,
∑Pr{Aj|B} = ∑Pr{Aj∩B}/Pr{B} = Pr{(∪Aj)∩B}/Pr{B} = Pr{Ω∩B}/Pr{B}
= Pr{B}/Pr{B} = 1

#### vinux

##### Dark Knight
Alright so then to relate it back the original equation

∑j-m P(Aj|B)=1.

We have ∑j-m (A∩B)=B? So then how do we relate the two.
P(Aj|B) and P(Aj∩B) are not same..