Need some help with probability and density funtions.

I have two functions:

$\displaystyle f(x)=kx^2$ for x = 2, 3, 4, 6

$\displaystyle f(x)=kx^2$ for $\displaystyle 2<=x<=6$

I need to find the popper value for k, the mean, and the variance.

For the first function I found k = 1/65 using the fact that the probabilities must sum to 1. Is this correct?

For the mean of the first function, do I plug in each value into the function, then take this result and multiply it by the value, then sum? Like this:

$\displaystyle (4/65 *2)+(9/65 *3)+(16/65 *4)+(36/65 *6)$ = 315/65 = 4.85?

And for the variance my notes say: Sum of (value * mean)^2 * prob. of the value

3219.68 is what I get, is this correct?

As far as the second density function, I am not sure where to start? How do you find the proper value for k when the function is continuous?