





Studia grazie alle numerose risorse presenti su Docsity
Guadagna punti aiutando altri studenti oppure acquistali con un piano Premium
Prepara i tuoi esami
Studia grazie alle numerose risorse presenti su Docsity
Prepara i tuoi esami con i documenti condivisi da studenti come te su Docsity
Trova i documenti specifici per gli esami della tua università
Preparati con lezioni e prove svolte basate sui programmi universitari!
Rispondi a reali domande d’esame e scopri la tua preparazione
Riassumi i tuoi documenti, fagli domande, convertili in quiz e mappe concettuali
Studia con prove svolte, tesine e consigli utili
Togliti ogni dubbio leggendo le risposte alle domande fatte da altri studenti come te
Esplora i documenti più scaricati per gli argomenti di studio più popolari
Ottieni i punti per scaricare
Guadagna punti aiutando altri studenti oppure acquistali con un piano Premium
Summary of the lectures and book of RStudio and Radiant for the statistics exam in Bocconi
Tipologia: Appunti
1 / 9
Questa pagina non è visibile nell’anteprima
Non perderti parti importanti!






1) Console → It is possible to type in the commands we intend to execute and in which the output produced by the commands is printed. 2) Script → It allows you to write several lines of code (while the console is useful for just few lines).
Assign a variable → <- or =
x <- 7 x [1] 7 Note! The == logical operator, instead, checks if the left side is equal to the right side and returns TRUE or FALSE.
Create a vector → c(elements)
vector_name <- c(4,6, 8 ,12) Selecting elements from vectors → [position_of_the_element] vector_name[3] [1] 8 Slicing a vector → : x = 0:6 (from 0 to 6) Functions of vectors
To download a package:
→ PDF : f(x) = dnorm(x, mean, sd) → CDF : F(x) = P(X<x) = pnorm(x, mean, sd) F(x) = P(X>x) = 1- pnorm(x, μ, σ) = pnorm(x, μ, σ, lower.tail=FALSE) Quantiles of order x → Qx = qnorm(x, mean, sd)
Density → PDF: f(x) = dt(x, df) Distribution function → CDF: F(x) = P(X<x) = pt(x, df) F(x) = P(X>x) = 1- pt(x, df) = pt(x, df, lower.tail=FALSE) Quantiles of order x → Qx = qt(x, df)
Density → PDF: f(x) = dchisq(x, df) Distribution function → CDF: F(x) = P(X<x) = pchisq(x, df) F(x) = P(X>x) = 1- pchisq(x, df) = pchisq(x, df, lower.tail=FALSE) Quantiles of order x → Qx = qchisq(x, df)
Define the model
SINGLE PROPORTION (Hypothesis test case 3)