Timothy Madegwa
4 min readAug 13, 2018

--

ANALYSIS OF HEART DISEASE AND HOW IT AFFECTS THE SEXES.

Hello, I set out to find out the chances of getting heart disease based on your sex. Is there a difference between the sexes?

I got my hands on an online data set of 303 patients who’s various heart and heart function measurements were taken and in the end they were either declared to have a heart disease or not. Some of the parameters included heart rates, blood pressure, angina, age, among many others. But for this read I will mainly focus on the sex and angina and how it affects the probability of being diagnosed with heart disease. Below is a summary of the data.

fig 1. overview of the data

Using python, I did an exploratory analysis to try and get to know more about my data as shown below.

fig 2 . Descriptive statistics about the data

I then went on to find out the composition of the data set in terms of how many men and women are in the data set and also how many of the people in there have a condition called angina. Angina simply refers to a type of chest pain caused by reduced blood flow to the heart and it is usually a symptom of coronary artery disease. It contained the following.

fig 3. Summery of the composition of the data set

Upon further analysis I got to find out that the data set contained 96 women and 207 men making a total of 303. From the women, I found out the only 24 women (25% of the total women) were found to be sick and 72 women (75% of the total women) were found to be healthy. On the male side, I found out that 114 men (about 55% of the total men) were diagnosed with heart disease and only 93 men (about 45% of the total men)were found to be healthy.

fig 4. A graph showing the health status based on sex

Moving o to the analysis of angina between the sexes and its effects on the probability on the chances of one having heart disease. Here I was able to find out that about 77% of the women in the data set do not suffer from angina and 23% of them suffer from it. On the male side I found out that there are about 63% of the men in this data set do not suffer from angina and 37% of them do as seen in figure 6.

fig 5. Angina in the sexes
fig 6.

Also from the data I found out that about 70% of the people not having angina were were declared healthy and the other 30% were diagnosed with heart disease. Also from those who were suffering from angina, 77% of them went on to be diagnosed with heart disease while only 23% of those who had angina were declared to be healthy.

Also age is a very vital factor in being diagnosed with a heart condition and upon analysis, I found that approximately 60% of the people below 60 years in this data set are healthy while about 58% of those above 60 years old have a heart condition as seen below.

fig 7.

From this analysis I got to see that it is more likely for men to be diagnosed with heart disease than women as only 25% of the women had heart disease as compared to 55% of the men in the data set. I also found out that most people suffering from angina have an underlying heart problem.

I attribute the difference in probability of getting heart disease between the sexes to the following 2 major reasons.

  1. The difference in lifestyle choices among the men and women, where men tend to drink more alcohol and smoke more which lead to heart diseases in the long run as compared to women who drink less and eat healthier hence lower chances of lifestyle diseases.
  2. Women tend to be more active especially at a more advanced age (after retirement)while men tend to be less active as compared to the women who keep busy with house chores and other small activities.

--

--