# P-value feature map

On the website (this link): Femur: Group Difference Statistics in Python - ShapeWorks (sciinstitute.github.io)

“For the femur mode, separate statistical tests for differences in correspondence positions are applied to every correspondence index. We use Hotelling T^2 metric(nonparametric permutation test) with false discovery rate correction (FDR) for multiple comparisons. This method helps identify and visualize localized regions of significant shape differences. The null hypothesis for this test is that the distributions of the locations of corresponding sample points are the same regardless of the groups. Hence, higher p-values here would mean the group differences are significant and are not from the same distribution.”

I have a few questions regarding this -

1. When I previously used the Hotelling T^2 test, it was to compare mean shapes between groups to see if they were statistically significant. How does this calculate p-values at every correspondence point? I would like to use this feature map but don’t feel comfortable yet with limited understanding of its mathematical mechanisms.

2. If the null hypothesis if that they are from the same distribution, wouldn’t lower p-values indicate we are able to reject the null hypothesis and thus they are not from the same distribution?

Thanks for your help!

1. Hotelling-T2 Library: hotelling — Hotelling T2 0.5.0 documentation
Given a shape model with group IDs, we create the subsets based on the group IDs. Since the shape models are in correspondence, we access one particle location at a time and create two vectors.
x: All particle locations of group 1 at ith location
y: All particle locations of group 2 at ith location
Using the two sample Hotelling-T2 test we are trying to see if the particle positions at the ith location of all group 1 samples come from the same distribution as the particle position at ith location of group 2 samples. If the group differences are significant then the particle positions are not from the same distribution.
Our implementation: Link
2. This tests the null hypothesis that two multivariate samples have the same underlying probability distribution when specifying samples for x and y. You are correct with this point. The statement should say that if the p-values are lower than the threshold then they are not from the same distribution. Thanks for pointing this out.

Hope this helps.

This answers my question completely. Thank you for your help!