# Quantifying Privacy Risks for Continuous Trait Data
## 6 Attack Validation
### Mathematical Analysis
#### 6.3.1 Binary Classification Analysis  
We first approximate the truncated normal distribution to the normal distribution. Let the two probability density distribution functions \(f_{1}(t)\) and \(f_{2}(t)\) be normal distributions \(\frac{1}{\sqrt{2\pi\sigma_{1}}}\exp(-\frac{(t-\mu_{1})^{2}}{2\sigma_{1}^{2}})\) and \(\frac{1}{\sqrt{2\pi\sigma_{2}}}\exp(-\frac{(t-\mu_{2})^{2}}{2\sigma_{2}^{2}})\), then the joint probability density distributions with their prior probabilities \(p_{1}\) and \(p_{2}\) can be \(p_{1}f_{1}(t)\) and \(p_{2}f_{2}(t)\). When \(p_{1}f_{1}(t)\) and \(p_{2}f_{2}(t)\) are placed in the same coordinate system, there is a possibility that the two intersect, that is, \(p_{1}f_{1}(t)=p_{2}f_{2}(t)\), which can be expanded as  
\[\frac{p_{1}}{\sqrt{2\pi\sigma_{1}}}\exp(-\frac{(t-\mu_{1})^{2}}{2\sigma_{1}^{ 2}})=\frac{p_{2}}{\sqrt{2\pi\sigma_{2}}}\exp(-\frac{(t-\mu_{2})^{2}}{2\sigma_{ 2}^{2}}) \tag{7}\]  
where \(\sigma_{1}\) and \(\sigma_{2}\) are the standard deviations of \(f_{1}(t)\) and \(f_{2}(t)\), \(\mu_{1}\) and \(\mu_{2}\) are the expectations of \(f_{1}(t)\) and \(f_{2}(t)\), respectively. To simplify Equation (7), we first define \(r\) as the ratio between \(\sigma_{1}\) and \(\sigma_{2}\) that \(\sigma_{2}/\sigma_{1}=r\), while \(p\) is the ratio between \(p_{1}\) and \(p_{2}\) that \(p_{2}/p_{1}=p\). Eliminate \(1/\sqrt{2\pi\sigma}\) from both sides of the equation, then the Equation (7) can be changed as  
\[\exp(-\frac{(t-\mu_{1})^{2}}{2\sigma_{1}^{2}})=\frac{p}{r}\exp(-\frac{(t-\mu_ {2})^{2}}{2r^{2}\sigma_{1}^{2}}) \tag{8}\]  
Figure 3: **Matching Accuracy with \(m=50,n=100\). The _z score_\(z\) as 0.13, 0.68, 1.29, 1.65, 2.33, and 2.58 are expressed on the abscissa, respectively, while the matching accuracy is expressed on the ordinate. Matching accuracy with different MAFs and their standard deviations are expressed as different colored symbols with error bars, while the orange ellipse, red rectangle, olive diamond and blue triangle represent the MAF values of 0.05, 0.15, 0.30 and 0.45, respectively. **  
Next, let \(x=\frac{t-\mu_{1}}{\sigma_{1}}\), then we have  
\[\exp(-\frac{x^{2}}{2})=\frac{1}{r}\exp(-\frac{(x-\frac{|x_{2}-\mu_{1}}{\sigma_{1} })^{2}}{2r^{2}}) \tag{9}\]  
Finally, \(\frac{t-\mu_{2}}{\sigma_{2}}\) can be transformed as \(\frac{(x-(1+r)z)}{r}\) referring definition of _z score_ as Equation (6) and \(r\), with \(r,z,p\) we have  
\[\exp(-\frac{x^{2}}{2})=\frac{p}{r}\exp(-\frac{(x-(1+r)z)^{2}}{2r^{2}}) \tag{10}\]  
Through the transformation above, we simplify six variables \(\sigma_{1},\sigma_{2},\mu_{1},\mu_{2},p_{1},p_{2}\) into three as \(r,z,p\). Then finding the intersection between \(p_{1}f_{1}(t)\) and \(p_{2}f_{2}(t)\) is equivalent to finding the intersection between \(p_{1}f_{1}(x)\) and \(p_{2}f_{2}(x)\), or between \(f_{1}(x)\) and \(pf_{2}(x)\). Take the logarithm of both sides from Equation (10):  
\[\frac{x^{2}}{2}-\frac{(x-(1+r)z)^{2}}{2r^{2}}=\ln\frac{r}{p} \tag{11}\]  
Equation (11) is a quadratic equation for \(x\), which can be converted to the form \(ax^{2}+bx+c=0\):  
Figure 4: **True-positive and false-positive for varying _F score_ with SNP size \(50\) and _z score_ \(2.33\). The abscissa values is _F score_, and the ordinate is metrics as percentage. Solid and dotted lines represent true-positive and false-positive, respectively. Different colours signify different sample sizes \(n\), where orange represents \(n=50\), red represents \(n=100\), olive represents \(n=200\), and blue represents \(n=500\). Subfigures successively indicate MAF values \(p\) as \(0.05\), \(0.15\), \(0.30\), and \(0.45\). (a) 50 SNP, \(0.05\) MAF. (b) 50 SNP, \(0.15\) MAF. (c) 50 SNP, \(0.30\) MAF. (d) 50 SNP, \(0.45\) MAF.