india <- read.csv("india.csv")
mean(india$female)
## [1] 0.3354037
mean(india$water)
## [1] 17.84161
var(india$female)
## [1] 0.2236025
var(india$water)
## [1] 1134.271
sd(india$female)^2
## [1] 0.2236025
female_water<-india$water[india$female==1]
mean(female_water)
## [1] 23.99074
male_water<-india$water[india$female==0]
mean(male_water)
## [1] 14.73832
mean(female_water)- mean(male_water)
## [1] 9.252423
The average of villages having an assigned woman as a politician is 0 women. The average of villages having new or repaired drinking water facilities since assignment is 18 facilities.
The average number of new or repaired water facilities in a village with a female politician was about 24 water facilities. The average number of new or repaired water facilities in a village with a male politician was about 15 water facilities.
The casual effect of having a female politician is that there would be about 9 more new or repaired water facilities in the village that if a male politician would be. This assumption is made by calculating the average water facilities of both female and male-led villages and subtracting the averages. It can be inferred out of 322 villages, that female politicians would increase the number of new or repaired water facilities in India compared to male politicians.