Hypothesis tests applied to evaluate mean differences
The first aspect of descriptive statistics in any clinical research data analysis is the age of the subjects. Age is known to affect many diseases, especially cardiovascular diseases. We can see that the mean age of subjects without CAD is 52.58
years and for subjects with CAD, it is 56.62
years (observe Figure 9.4 again). Standard deviations are 9.51
and 7.93
for these groups, respectively. Taking this into consideration, age could play a role in future analyses, as the CAD subjects are older.
Let us use a hypothesis test to check if this difference is statistically significant:
#Separate the dataset according to 'cad' groups of interest datacad = dataset[dataset['cad']==1] datacontrol = dataset[dataset['cad']==0] #Separate the dataset according to 'age' groups of interest cadage=datacad['age'] contage=datacontrol[‘age’] from scipy import stats # perform t-test...