Developing Date Products - Coursera

BMI Apllication

Revital

BMI Calculator application - intro

This application does a BMI calculation based on the user inputs of height and weight.

In addition to the regular BMI calculations, the user can set is desired BMI level.

According to the desired BMI level the application shows the user what is his/her current situation in comparison to the desired BMI and weight.

Additionaly- most relevant for women of 30-39 age, a comparison to the average women weight.

The Comparison Algorithm to population weight -I

The 'Women' dataset from R (documentation), contains the average weight for USA women, at age of 30-39, per height.

    data(women)
    head(women,4)
##   height weight
## 1     58    115
## 2     59    117
## 3     60    120
## 4     61    123

The height was converted to 'cm' and the weight to 'kg'.

    women$Hcm<-women[,1]*2.54
    women$Wkg<-women[,2]*0.453592
    fit<-lm(Wkg ~ Hcm, data=women)

The Comparison Algorithm to population weight -II

Based on the women data I calcualted the linear regression line for the weight as a outcome of the height.

This model was then used to predit the average weight of women in the given user height, allowing us to do waht is really important -

Compare ourselves to the other women around !

(that is if you are a women, of course, :-))

The women data and regression line

    plot(women$Hcm, women$Wkg, xlab="Height (cm)", ylab="Weight (kg)")
    abline(lm(women$Wkg ~ women$Hcm), col="blue")

plot of chunk unnamed-chunk-3