Also can you pleeeaaasee explain to me the part of Σ/n? Why did you do that?
So the expected value of x is just summation of all the x values divided by the number there are. That can be written as Σ/n. Similarly for x^2! The formulae that follow this I learnt in Edexcel FP1 (I don't know if you're doing a different exam board but it's in the formula book for Edexcel)