# Quantifying Privacy Risks for Continuous Trait Data
## 6 Attack Validation
### Mathematical Analysis
#### 6.3.2 Ternary SNP-Based Classification Analysis  
Similarly with the derivation process for binary classification, let the prior probabilities of distributions \(f_{1}(t)\), \(f_{2}(t)\), and \(f_{3}(t)\) be \(p_{1}\), \(p_{2}\), and \(p_{3}\), respectively, then the intersection points \(t\) between joint distribution \(p_{1}f_{1}(t)\), \(p_{2}f_{2}(t)\) and \(p_{3}f_{3}(t)\) can be represented as  
\[ \begin{split}\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}})\\ \frac{p_{1}}{\sqrt{2\pi}\sigma_{1}}\exp(-\frac{(t-\mu_{1})^{2}}{2 \sigma_{1}^{2}})&=\frac{p_{3}}{\sqrt{2\pi}\sigma_{3}}\exp(- \frac{(t-\mu_{3})^{2}}{2\sigma_{3}^{2}})\\ \frac{p_{2}}{\sqrt{2\pi}\sigma_{2}}\exp(-\frac{(t-\mu_{2})^{2}}{2 \sigma_{2}^{2}})&=\frac{p_{3}}{\sqrt{2\pi}\sigma_{3}}\exp(- \frac{(t-\mu_{3})^{2}}{2\sigma_{3}^{2}})\end{split}  \tag{20}\]  
Let \(r_{\alpha}=\frac{\sigma_{\alpha}}{\sigma_{1}},r_{\beta}=\frac{\sigma_{\alpha} }{\sigma_{1}},r_{\gamma}=\frac{\sigma_{\alpha}}{\sigma_{2}}\), then we have \(r_{\gamma}=\frac{\tau_{\beta}}{\tau_{\alpha}}\). With MAF value \(p_{\text{m}}\) and the definition of MAF from Section 2.3, \(p_{1}\), \(p_{2}\), and \(p_{3}\) can be represented as \(p_{1}=(1-p_{\text{m}})^{2}\), \(p_{2}=2p_{\text{m}}(1-p_{\text{m}})\), and \(p_{3}=p_{\text{m}}^{2}\). Let \(p_{\alpha}=\frac{p_{2}}{p_{1}},p_{\beta}=\frac{p_{1}^{2}}{p_{1}},p_{\gamma}= \frac{p_{2}^{2}}{p_{2}}\), then we have \(p_{\alpha}=\frac{2p_{\text{m}}}{1-p_{\text{m}}},p_{\beta}=(\frac{p_{\text{m}} }{1-p_{\text{m}}})^{2},p_{\gamma}=\frac{p_{\text{m}}}{2(1-p_{\text{m}})}\). To simplify \(p_{\alpha},p_{\beta},p_{\gamma}\), let \(\frac{p_{\text{m}}}{1-p_{\text{m}}}=p_{\text{st}}\), then we have \(p_{\alpha}=2p_{\text{st}},p_{\beta}=p_{\text{st}}^{\text{st}},p_{\gamma}=\frac {p_{\text{st}}^{\text{st}}}{2}\). For the values of \(z\), let \(z_{\alpha}=\frac{\mu_{2}-\mu_{1}}{\sigma_{1}+\sigma_{2}},z_{\beta}=\frac{\mu_{3 }-\mu_{1}}{\sigma_{1}+\sigma_{3}}\), \(z_{\gamma}=\frac{\mu_{3}-\mu_{2}}{\sigma_{2}+\sigma_{3}}\), then \(z_{\gamma}\) can be represented as \(z_{\gamma}=[(1+r_{\beta})z_{\beta}-(1+r_{\alpha})z_{\alpha}]/(1+r_{\beta}/\tau_{ \alpha})\). Finally let \(x=\frac{t-\mu_{1}}{\sigma_{1}}\), and substitute \(r_{\alpha},r_{\beta},p_{\text{st}},z_{\alpha},z_{\beta}\) into Equation (20), then we have three quadratic equations:  
Figure 7: _sensitivity_ **with different \(r,z\), and \(p\). ** The three coordinates represent \(r,z\), and \(p\), respectively. _Sensitivity_ is represented by different colors. The deeper the color, the higher the _sensitivity_. The vacant parts indicate that the _sensitivity_ is zero when \(r,z,p\) take the corresponding values. \[(r_{\alpha}^{2}-1)x^{2}+2(r_{\alpha}+1)z_{\alpha}x-[(1+r_{\alpha})^{2}z_{\alpha}^{2 }+2r_{\alpha}^{2}\ln\frac{r_{\alpha}}{2p_{\rm st}}]=0\]  
\[(r_{\beta}^{2}-1)x^{2}+2(r_{\beta}+1)z_{\beta}x-[(1+r_{\beta})^{2}z_{\beta}^{2}+2 r_{\beta}^{2}\ln\frac{r_{\beta}}{p_{\rm st}^{2}}]=0\]  
\[(\frac{r_{\beta}^{2}}{r_{\alpha}^{2}}-1)x^{2}+2[(1+r_{\beta})z_{\beta}-(1+r_{ \alpha})z_{\alpha}]x\]  
\[-\{[(1+r_{\beta})z_{\beta}-(1+r_{\alpha})z_{\alpha}]^{2}+2\frac{r_{\beta}^{2}} {r_{\alpha}^{2}}\ln\frac{2r_{\beta}}{p_{\rm st}r_{\alpha}}\}=0\]  
Equation (21) shows that for each pair \(\{\mathbb{T}^{*}(i,\cdot),\mathbb{S}^{*}(i,\cdot)\}\), there are three _sensitivity_ values, which are determined by five parameters \(z_{\alpha},z_{\beta},r_{\alpha},r_{\beta},p_{\rm m}\). Our synthetic data was generated without considering the factor \(r\), hence \(z_{\alpha},z_{\beta},p_{\rm m}\) of the synthetic data are pre-set while \(r_{\alpha},r_{\beta}\) are random, which can explain the fluctuation of the matching accuracy in Figure 3. Figure 7 shows that a change in \(r\) will have a significant impact on _sensitivity_ when the value of \(z\) is not high, while it has less effect on _sensitivity_ if the value of \(z\) is high enough, which fix our matching accuracy results appropriately.