

Studia grazie alle numerose risorse presenti su Docsity
Guadagna punti aiutando altri studenti oppure acquistali con un piano Premium
Questa pagina non è visibile nell’anteprima
Non perderti parti importanti!


1
a.y. 202 5 - 2026
Prof. Pierangelo Ciurlia
Written exam ( Facsimile )
December 15 , 202 5
Exercise 1 (5 points). Given the observations (𝑥
consider the models given by 𝑓 1
(𝑋) = 𝑋 + 1 and 𝑓
5
(𝑋) = 2 𝑋. Check whether 𝑓
1
has a smallest
training error than 𝑓
5
Exercise 2 (5 points). For a response 𝑌 and two predictors 𝑋
1
and 𝑋
5
, the following model is
estimated
1
5
1
5
Supposed that 𝑋 1
is a dummy variable ( taking values in { 0 , 1 }), c alculate the change of 𝑌 when 𝑋
1
takes values 0 and 1 , while 𝑋 5
is held fixed.
Exercise 3 (5 points). Consider the following observations related to the variables (𝑋 1
5
1
5
Predict the response 𝑌 when (𝑋 1
5
= 4. 4 ) by KNN regression with 𝐾 = 1 or 𝐾 = 2 ,
respectively.
Exercise 4 (5 points). Explain the difference between 𝐿
1
norm and 𝐿
5
norm of a vector and calculate
these values for the vector 𝐱 = ( 0 , 2 , − 4 ).
Exercise 5 (5 points). Given the observations
L
M
N
transform them via z-score scaling.
2
Exercise 6 (5 points). To evaluate the quality of the service, we collect the following data about
customers of our pizzerias: 𝑋 1
= walking distance from the closest parking place ( in Km ); 𝑋
5
= food
quality ( from 1 to 10 ); 𝑋
O
= gender (female = 1 , male = 0 ) , 𝑌 = is the customer satisfied? ( Yes /
No ). We estimate a logistic model to predict 𝑌 according to 𝑋 1
5
O
and we obtain the following
estimated parameters
V
1
5
O
a. Write the estimated model.
b. Calculate the probability that a male customer is satisfied when he has parked 0. 6 from the
restaurant and has given a score equal to 8 to the food quality.