Question : Calculate E[X] and Var[X] when X represents the outcome when a fair die is rolled.
---------------------------------------------------------------------
I think you know now that the first is not correct (I haven't checked the second).
When I say:
I don't mean that you simply show the results of your work. I mean show all the work. If you had done this, it (probably) would have been simple to point out the mistake you made. Post #5 shows what I expected you to post when I said:Please show all your work if you're still stuck.
Substitute f(x) and the values of x into the formulas that you have quoted and do the calculations