96339 - PROGRAMMING LAB 1

Anno Accademico 2023/2024

  • Docente: Marco Novelli
  • Crediti formativi: 2
  • Lingua di insegnamento: Inglese
  • Modalità didattica: Convenzionale - Lezioni in presenza
  • Campus: Bologna
  • Corso: Laurea in Economics, Politics and Social Sciences (cod. 5819)

Conoscenze e abilità da conseguire

Students develop transversal skills with a focus on the development of skills complementary to the quantitative methods’ courses. In particular, students acquire skills in data analysis and in the use of dedicated software and programming languages such as R or Python, as well as skills in data visualization.

Contenuti

This is not an introductory course on R, students without the required background in basic programming are supposed to fill their gap before preparing themselves for the examination.

1) Univariate, bivariate descriptive statistics and graphics with R for quantitative and qualitative variables.

2) Probability distributions in R: random sampling, discrete and continuous distributions, densities, cumulative distribution functions and quantiles.

3) Point estimation, confidence intervals and hypotheses testing in R.

4) The linear regression model in R, diagnostic plots and goodness of fit measures.

During the course, several datasets and examples of applications to economics and social sciences will be illustrated.

Students without the required background knowledge in statistics, probability and/or basic programming are supposed to fill their gap before preparing themselves for the examination.

Required background knowledge in informatics/programming

  • Basics of programming: definition and design of an algorithm, data types.
  • Structured programming, sequence, iteration, choice; procedures and functions.

Required background knowledge in statistics

  • Empirical frequency distributions.
  • Measures of location (mode, median, arithmetic mean).
  • Measures of dispersion, linear correleation and simple linear regression.
  • Meaure of association, meand dependence, chi-squared, Cramer's V.
  • Fundamentals of parametric estimation and hypothesis testing.
  • Statistical tables for the standard normal and Student's t distributions.

Required background knowledge in mathematics

  • Rules for product and summation notation. Factorial, binomial coefficient and their properties.
  • Real functions, limit, derivative and integration.

Required background knowledge in probability

  • Random experiments and their sample spaces. Simple, compound and disjoint events. Impossible and certain events. Events obtained by intersection, union and negation.
  • Definitions and axioms of probability. Conditional probability. Independent events. The law of total probability. Bayes' theorem.
  • Random variables. Rules for computing probabilities for any random variable. The distribution function of a random variable. Probability mass function. Probability density function.
  • Sequences of random variables. Limit theorems and convergence.

 

Testi/Bibliografia

Used course material consists of lecture notes and slides provided by the teacher.

Background information can be found in several chapters of the following books:

P. Dalgaard (2008) Introductory statistics with R - 2 ed. New York: Springer.

James (JD) Long, Paul Teetor (2019) R Cookbook, 2nd Edition Freely available at: https://rc2e.com/

Metodi didattici

All the lectures will be held in the lab where several applications will be developed by using R.

Although attending lessons is not mandatory, it is strongly recommended.

Attending lectures is the first and easiest way to start learning and taking active part in all teaching activities is crucial and strongly recommended for all students. Thus, lessons are not recorded.

 

In consideration of the type of activity and the teaching methods adopted, the attendance of this training activity requires the prior participation of all students in the training modules 1 and 2 on safety in the study places, in e-learning mode. (https://elearning-sicurezza.unibo.it/)

Modalità di verifica e valutazione dell'apprendimento

To be eligible for the exam, the student must have previously passed the Statistics and Programming (96321) examination successfully.

This is a pass/fail exam. For all students (regardless of the fact that they have attended lectures or not) the exam consists in a TAKE-HOME PROJECT. 

You need to deliver the following files:

  1. REPORT (save it as Report_LastNames) with the data description, the analysis implemented and the results (both numerical and graphical)
  2. SCRIPT (save it as Script_LastNames) with the code used for the analysis
  3. The Dataset used (save it as Dataset_LastNames)

those files must be sent to m.novelli@unibo.it.

You can do it in a group of maximum 4 people, this means that you can do it by yourself if you prefer (the group composition must be decided and sent me via email - with the names and email of the components along with the student id numbers - BEFORE THE SITTING).

Further useful details on how to write the project can be found on the teaching material.

Further useful information about the exams:

  • In order to take the exam, all students are required to put their names down for the exam through Almaesami platform.
  • Exams can only be taken in the official exam sessions.

Strumenti a supporto della didattica

Computer and R scripts.

Orario di ricevimento

Consulta il sito web di Marco Novelli