Salta ai contenuti. | Salta alla navigazione

Strumenti personali

lab 3_ introduction to LRM

Plain Text icon Lab 3_ introduction to LRM.txt — Plain Text, 870 bytes

Contenuto del file

INTRODUCTION TO SIMPLE REGRESSION LINEAR MODEL 

We are business consultant of the MINI MARKET company, based on various 
shops. The general director want create a new shop in Ferrara, but to individuate the 
typology and dimension, he ask us to undersand the relationship 
between the the sales volume and the size of the sales points.

#this is a simple example and we create our sample of data#
#the size of shops is expressed in Mq(100)
the annual sales is expressed in Euro (1000). 
before to develop a model, we want analyze the distribution of our data

#size = x 
#annual sales volumes = y #

#let's create our database#

x=c(3.7,3.6,3.8,5.6,1.3,2.2,3.3,4.1,3.2,4.5,5.2,4.6,3.8,3)
y=c(8.7,7.9,6.7,9.5,8.4,5.6,3.7,6.7,5.5,6.9,10.7,7.6,7.8,4.1)

#1. let's observe the data#
hist(x)
hist(y)
mean(x)
median(x)
mean(y)
median(y)

plot(x,y)