let event F represents that the selected student is female,M represents that selected student is male,R represents that selected female student is majoring in computer science,S represents that selected male student is majoring in computer science.
so P(F)=0.52
P(M)=0.48
let total student is 100.so 52 students are female and 2 among them are majoring in computer science.
so,P(R/F)=2/52
let total student is 100.so 5 students are majoring in computer science in total and 2 female students are majoring in computer science.so(5-2)=3 male students are majoring in computer science .And total male students=(100-52)=48
so,P(S/M)=3/48
for a,we have to evaluate P(student is female/student is majoring in computer science )=
(P(F)*P(R/F)) / ((P(F)*P(R/F) )+(P(M)*P(S/M) )
=(2/52 * 0.52) / ((2/52 * 0.52) + (0.48 * 3/48))
=0.4
for b,we have to evaluate P(student is majoring in computer science/student is female )=P(R/F)=2/52