Mode , Screen 6

  1. The 2nd & 3rd plots are showing wrong results ie; The median (black line) is left of the mode in 2nd plot .Pls. correct.

  2. The DENSITY PLOTS show probabilities on y-axis in the lims. 0 to 0.000008 for 1st 2 plots & 0 to 0.02 for the last plot. Actually, Probabilities always lie between 0& 1. But, the max. values of probabilities in the plots are almost 0 ( 0.000008 ~ 0 & also 0.02 ~ 0). How the plots are constructed.

  3. I am finding some difficulty in coding for plots (since I am not a programmer) . Kindly explain the code lines in ‘bold’. Kindly elaborate scales :: comma.

geom_density(alpha = 0.1,
color=‘blue’,
fill=‘blue’) +
geom_vline(aes(xintercept = 150000,
color = ‘green’),
size = 1.2 ) +
scale_y_continuous(labels = scales::comma) +
** scale_x_continuous(labels = scales::comma,
lim = c(min(houses$SalePrice),
max(houses$SalePrice))) +
scale_colour_manual(values = c(“green”), **
** name = “”, **
** labels = c(“Mode”)) +

theme_bw() + **
** theme(legend.position=‘top’) +

The Year Built plot shows that there was a lot of construction work in the year 2005 in U.S. Is this because of economic boom or real estate demand.