18 apples total (3 rotten, 15 good). X = number of rotten in draw of 2.
P(X=0)=(218)(215)=153105.
P(X=1)=(218)(13)(115)=15345.
P(X=2)=(218)(23)=1533.
E(X)=0+45/153+6/153=51/153=1/3.
E(X2)=0+45/153+12/153=57/153.
Var=E(X2)−[E(X)]2=15357−91=15357−15317=15340.