Problem Statement

The goal of this report is to investigate whether the body measurement of Bitrochanteric diameter (bit.di) of each person fits the normal distribution based on their gender (sex).

The method is to perform summary statistics of the body measurement (Bit.di) grouped by their gender (Sex), implement distribution fitting to compare the empirical distribution of the measurement to a normal distribution separately in men and women, and lastly the interpretation of the report.

# Required packages
library(readr)
library(dplyr)
library(magrittr)
library(lattice)

Data

# Assign a variable to read the data
bdims <- read_csv("bdims.csv")

# Change the value of sex to Male and Female.
bdims$sex <- factor(bdims$sex, levels = c(1,0),
              labels=c("Male", "Female"))

Summary Statistics

# Summary Statistics of Bit.di grouped by Sex. 
bdims %>% group_by(sex) %>% summarise(
  Mean=mean(bit.di, na.rm=TRUE),
  Median=median(bit.di, na.rm=TRUE),
  SD=sd(bit.di, na.rm=TRUE),
  Q1=quantile(bit.di, probs=.25, na.rm=TRUE),
  Q3=quantile(bit.di,prob=.75,na.rm=TRUE),
  IQR=IQR(bit.di, na.rm=TRUE),
  Min=min(bit.di, na.rm=TRUE),
  Max=max(bit.di, na.rm=TRUE),
)

Distribution Fitting

The following graph shows the empirical distribution, then compare it to the theoritical normal distribution.

# Empirical distribution 
h <- bdims %>% histogram(~ bit.di|sex, 
                    col="violet",
                    layout=c(1,2),
                    data=.,
                    freq=TRUE,
                    xlab="Bitrochanteric Diameter in Cm", 
                    main=("Bitrochanteric measurement group by Sex"),
                    )
h

# Empirical distributions to normal distributions
bdims %>% histogram( ~ bit.di|sex, data=.,
          xlab = "Bitrochanteric Diameter (Cm)", type = "density", col="violet",
          main=("Empirical Distributions to Normal Distribution"),
          panel = function(x, ...) {
              panel.histogram(x, ...)
              panel.mathdensity(dmath = dnorm, col = "black",
                                args = list(mean=mean(x),sd=sd(x)))
          } )

Interpretation

As can be seen from the graph, male body tend to have bigger size of Bitrochanteric than the female body. The mean value of the male body is 32.53 cm and for female is 31.46 cm. The standard deviation for male body is 1.87 cm and for female is 2.05 cm.

The theoritical normal distribution fits almost perfectly to the empirical distribution for both male and female. Nearly all of the empirical data fall within the mean and the standard deviations of the Normal distribution.