Repeated measures ANOVA / paired t-test on different sample sizes I have multiple subjects walking under three experimental conditions to investigate how the step lengths are affected. Each subject performed all three conditions but the number of steps recorded is different for each experiment. I understand that I have to apply repeated measures ANOVA or paired t-test as the data are sampled from the same subjects but what is the proper way of dealing with the mismatch in sample sizes?
I am running this in Python so it will be great if pointers are given on how to code it.
EDIT 1:
Added fictitious data samples. For each condition, each subject may have different number of samples.
Condition | Subj A       | Subj B        | Subj C       |
Cond. 1   |0.5, 0.5, 0.55|1.1, 1.0, 1.05 |0.7, 0.75, 0.8|
Cond. 2   |0.3, 0.35, 0.4|0.9, 1.0       |0.5, 0.6, 0.5 |
Cond. 3   |0.4, 0.35     |0.9, 0.8, 0.8  |0.6, 0.5      |


I guess you should think about what your variables actually are. The tests would take something like:
Condition | A | B | C |
Cond. 1   |0.5|0.3|0.4|
Cond. 2   |1.1|1.0|0.9|

where A, B, and C are the persons and Cond. x the different conditions.
Here, one step is not one replicate! You take the average step length for each person under condition 1,...,n.
Why take the average? Because you want to know "a persons step size" under a given condition. Steps as such are pseudo replicates here: It is one and the same person and one and the same condition---you just take multiple measurements to get a better approximation of what "the step size" of person X is in that situation. Now that you took several measurements, you know the (average) step size of person X. Then you can compare this step size with the step size of person X in a different set up. You repeat the same with N persons and you'll have N replicates.
In python, you can do a paired t-test using
from scipy import stats
stats.ttest_rel()

The function takes two arrays that contain the values for the two conditions. Those arrays are both of length N (that is the number of test persons) and, obviously, their values should both be in the same order (person A is the first in both arrays, person B the second, and so on). You will also have to check the assumptions of the tests you are using; there is quite a number of tutorials in which the process is described in detail.
