Getting Started

Sabarish, Machine Learning in Marketing

Reading The Data

# reading the data
cc.df <- read.csv("DefaultData.csv")

Column Names Of The Dataframe

# column names of the dataframe
colnames(cc.df)
[1] "default" "student" "balance" "income" 

Number of Rows And Columns In The Dataframe

# dimension of the dataframe
dim(cc.df)
[1] 10000     4

Mean and Standard Deviation of income and balance

#mean of income and balance
mean(cc.df$income)
[1] 33516.98
mean(cc.df$balance)
[1] 835.3749
#standard deviation of income and balance
sd(cc.df$income)
[1] 13336.64
sd(cc.df$balance)
[1] 483.715

Comments based on interpretation

#Mean of income is 33516.98$
#Mean of balance is 835.37$

#SD of income is 13336.64$
#SD of balance is 483.715$