This is the second day I try to solve the Japanese sudoku.
The answer needed is the r^2 LD index value rounded down to 3 decimal places when A-B's frequency is equal to 0.2. There are two SNVs, SNV A and SNV B. Their two alleles are (A,a) and (B,b). Allele frequency of A is 0.2 and one of B is 0.7. The AB's frequency under extreme LD is equal to 0.2.
I've tried to use several configurations of the possible number configurations in the matrix but I still haven't arrived at the correct answer. x-squared=r^2
The sample code is:
tab<-matrix(c(0.2,0.5,0.5,0), 2,2)
tab
chisq.test(tab,correct=FALSE)