Evidenza e incertezza - Prologo alle lezioni - Dipartimento di Matematica

Pagina creata da Lorenzo Maggio
 
CONTINUA A LEGGERE
Evidenza e incertezza - Prologo alle lezioni - Dipartimento di Matematica
Evidenza e incertezza
                                   Prologo alle lezioni

                                     Luca La Rocca1

                   Dipartimento di Scienze Fisiche, Informatiche e Matematiche
                        Università degli Studi di Modena e Reggio Emilia

            Insegnamento di Statistica ed Elementi di Probabilità
                     Corso di Laurea in Informatica
                     Anno Accademico 2018/2019

1
    http://personale.unimore.it/rubrica/dettaglio/llarocca
    L. La Rocca (UNIMORE)               Evidenza e incertezza                SEP 2018/2019   1 / 20
The sexy job

Hal Varian, chief economist at Google & emeritus professor at UC
Berkeley, intervistato da McKinsey & Company nell’ottobre 2008:
    I keep saying the sexy job in the next ten years will be statisti-
    cians. People think I’m joking, but who would’ve guessed that
    computer engineers would’ve been the sexy job of the 1990s?
    ...
    Because now we really do have essentially free and ubiqui-
    tous data. So the complementary scarce factor is the ability to
    understand that data and extract value from it.
    ...
    I think statisticians are part of it, but it’s just a part. You also
    want to be able to visualize the data, communicate the data,
    and utilize it effectively.

   L. La Rocca (UNIMORE)       Evidenza e incertezza          SEP 2018/2019   2 / 20
Data samurai

                                       Eric Schmidt, Chairman of Google:
                                       “We are in the era of big data, and
                                       big data needs statisticians to make
                                       sense of it. The democratization of
                                       data means that those who can ana-
                                       lyze it well will win. Data is the sword
                                       of the twenty-first century, those who
                                       wield it well, the samurai”
                                       Eric Schmidt & Jonathan Rosenberg
                                       (2014). How Google Works. Grand
                                       Central Publishing, New York.

  immagine da Wikipedia (http://it.wikipedia.org/wiki/Samurai)

  L. La Rocca (UNIMORE)    Evidenza e incertezza                SEP 2018/2019   3 / 20
Data science

Statistical Analysis and Data Mining was the Hottest Skill of 2014
on LinkedIn (followed by Middleware and Integration Software)2
New Undergraduate Data Science Programs:
in the UK (University of Warwick, University of Nottingham)
and in the US (Winona State University, University of California
at Irvine, Northern Kentucky University, Ohio State University,
Miami University, University of Michigan) where the number
of undergraduate statistics degrees has nearly doubled
in the last four years (fastest-growing STEM degree)3

  2
    Linkedin Official Blog http://blog.linkedin.com/2014/12/17/
the-25-hottest-skills-that-got-people-hired-in-2014
  3
    Amstat News http://magazine.amstat.org/blog/2015/08/01/
new-undergraduate-data-science-programs-2
   L. La Rocca (UNIMORE)     Evidenza e incertezza        SEP 2018/2019   4 / 20
The Global Hottest Skills of 2015 on LinkedIn

 1     Cloud and Distributed Computing (not recorded in 2014)
 2     Statistical Analysis and Data Mining (↓ 1)
 3     Marketing Campaign Management (↑ 9)
 4     SEO/SEM Marketing (Search Engine Optimization/Marketing, ↑ 1)
 5     Middleware and Integration Software (↓ 3)
 6     Mobile Development (↑ 1)
 7     Network and Information Security (↓ 3)
 8     Storage Systems and Management (↓ 5)
 9     Web Architecture and Development Frameworks (↓ 1)
 10    User Interface Design (↑ 4)4

  4
   Linkedin Official Blog https://blog.linkedin.com/2016/01/12/
the-25-skills-that-can-get-you-hired-in-2016
      L. La Rocca (UNIMORE)     Evidenza e incertezza    SEP 2018/2019   5 / 20
The Global Top Skills of 2016 on LinkedIn

 1     Cloud and Distributed Computing (↔)
 2     Statistical Analysis and Data Mining (↔)
 3     Web Architecture and Development Framework (↑ 6)
 4     Middleware and Integration Software (↑ 1)
 5     User Interface Design (↑ 5)
 6     Network and Information Security (↑ 1)
 7     Mobile Development (↓ 1)
 8     Data Presentation (not recorded in 2015)
 9     SEO/SEM Marketing (Search Engine Optimization/Marketing, ↓ 5)
 10    Storage Systems and Management (↓ 2)5

  5
   Linkedin Official Blog https://blog.linkedin.com/2016/10/20/
top-skills-2016-week-of-learning-linkedin
      L. La Rocca (UNIMORE)    Evidenza e incertezza      SEP 2018/2019   6 / 20
The Top Hard Skills of 2017 on LinkedIn

  1    Cloud and Distributed Computing (↔)
  2    Statistical Analysis and Data Mining (↔)
  3    Middleware and Integration Software (↑ 1)
  4    Web Architecture and Development Framework (↓ 1)
  5    User Interface Design (↔)
  6    Software Revision Control Systems (new entry)
  7    Data Presentation (↑ 1)
  8    SEO/SEM Marketing (Search Engine Optimization/Marketing, ↑ 1)
  9    Mobile Development (↓ 2)
 10    Network and Information Security (↓ 4)6

   6
     Linkedin Learning Blog https://learning.linkedin.com/blog/top-skills/
the-skills-companies-need-most-in-2018--and-the-courses-to-get-t

      L. La Rocca (UNIMORE)          Evidenza e incertezza                   SEP 2018/2019   7 / 20
The data deluge

Nel 2013 IBM (http://www.ibm.com/big-data/us/en,
http://en.wikipedia.org/wiki/Big_data) stimava che:
    Every day, 2.5 billion gigabytes of high-velocity data are crea-
    ted in a variety of forms, such as social media posts, infor-
    mation gathered in sensors and medical devices, videos and
    transaction records.
La nostra capacità di memoria è circa un milionesimo di questo valore
(http://www.sizes.com/people/brain.htm):
    Robert Birge (Syracuse University) who studies the storage
    of data in proteins, estimated in 1996 that the memory capacity
    of the brain was between one and ten terabytes, with a most
    likely value of 3 terabytes.

Siamo però abili a riconoscere (interruzioni di) regolarità nei dati. . .

   L. La Rocca (UNIMORE)        Evidenza e incertezza         SEP 2018/2019   8 / 20
Terremoti
              45.0

                                                                    +

                                                                                                          +
              44.9

                                                                                        +
                           +                                                    +                                 +
                                   +
                                                                +
              44.8

                                           +
 Latitudine

                                                                                        +       +
              44.7

                                               +
                                                   +
                                                                                                     +
                                                                                                          +
              44.6

                                       +                                                              +

                               +
              44.5

                                                                                    +       +

                     9.0               9.2                9.4                 9.6                   9.8           10.0

                                                                Longitudine

L. La Rocca (UNIMORE)                                  Evidenza e incertezza                                  SEP 2018/2019   9 / 20
Una regione sicura
              45.0

                                                                    +

                                                                                                          +
              44.9

                                                                                        +
                           +                                                    +                              +
                                   +
                                                                +
              44.8

                                           +
 Latitudine

                                                                                        +       +
              44.7

                                               +
                                                   +
                                                                                                     +
                                                                                                          +
              44.6

                                       +                                                              +

                               +
              44.5

                                                                                    +       +

                     9.0               9.2                9.4                 9.6                   9.8        10.0

                                                                Longitudine

L. La Rocca (UNIMORE)                                  Evidenza e incertezza                              SEP 2018/2019   10 / 20
Cluster Dendrogram
         1.0
         0.8
         0.6

                                                                                   # hierarchical clustering
Height

                                                                                   X=cbind(Longitude,Latitude)
         0.4

                                                                                   Tree=hclust(dist(X))
                                                                                   plot(Tree)
         0.2

                        15
               14

                                      13
                                      20
         0.0

                                                              3
                             8

                                                   7
                                                 18
                                                   9
                                                 10

                                                 4
                                                11
                    1
                    6

                                            5
                                           16

                                                                   2
                                                                  17
                                 12
                                 19

                                      Data Points
                                  hclust (*, "complete")

L. La Rocca (UNIMORE)                                      Evidenza e incertezza                       SEP 2018/2019   11 / 20
Quattro sorgenti sismiche
              45.0
              44.9
              44.8
 Latitudine

              44.7
              44.6
              44.5

                     9.0   9.2        9.4                 9.6   9.8        10.0

                                            Longitudine

L. La Rocca (UNIMORE)              Evidenza e incertezza              SEP 2018/2019   12 / 20
La tigre. . .

     Tyger! Tyger! burning bright
     In the forests of the night,
     What immortal hand or eye
     Could frame thy fearful symmetry?

William Blake (Songs of Experience, 1794)

   L. La Rocca (UNIMORE)          Evidenza e incertezza   SEP 2018/2019   13 / 20
. . . che non c’è

# set.seed(1709)
Latitude = 44.5+0.5*runif(20)
Longitude = 9+1*runif(20)

Chance!
     Some argue, plausibly, that we evolved to see a single cause
     even when there is none, on the basis that it is better to be
     safe than sorry, better to identify that pattern in the trees as
     a tiger, better to run—far better—than to assume that what we
     see is a chance effect of scattered light and shifting leaves in
     the breeze, creating an illusion of stripes.

Michael Blastland & Andrew Dilnot (2008). The Tiger That Isn’t (Expanded Edition).
Profile Books, London.

   L. La Rocca (UNIMORE)           Evidenza e incertezza           SEP 2018/2019   14 / 20
Segnale e rumore

Nate Silver7 è uno “statistico” americano divenuto celebre nel 2008 per
avere previsto correttamente 49 stati su 50 nelle elezioni presidenziali:
        Biologically, we are not very different from our ancestors. But some
        stone-age strengths have become information-age weaknesses.
        ...
        Meanwhile, if the quantity of information is increasing by 2.5 quintil-
        lion bytes per day, the amount of useful information almost certainly
        isn’t. Most of it is just noise, and the noise is increasing faster than
        the signal.
        ...
        We must become more comfortable with probability and uncertainty.
        We must think more carefully about the assumptions and beliefs that
        we bring to a problem.

   7
    Nate Silver (2012). The Signal and the Noise. Penguin, London.
Edizione italiana: Il Segnale e il Rumore, Fandango Libri (2013).
       L. La Rocca (UNIMORE)        Evidenza e incertezza            SEP 2018/2019   15 / 20
Morale

Siamo geneticamente predisposti per scavare nei dati ed estrarne
informazioni (un talento che ovviamente possiamo sviluppare con lo
studio e la pratica) ma se vogliamo dare il giusto peso all’evidenza che
i dati forniscono dobbiamo riconoscerne la natura incerta e imparare a
ragionare in termini probabilistici (un’attività per la quale l’intuizione
non basta e che dunque necessita di formalizzazione)
⇒ un’introduzione prima alla probabilità e poi alla statistica,
basata sui primi sei capitoli del testo di riferimento:
    Marco Boella (2010). Probabilità e Statistica per Ingegneria
    e Scienze. Pearson Italia, Milano-Torino.
Dettagli nella pagina dedicata ai contenuti delle lezioni
    http://www-dimat.unipv.it/luca/sep1819.htm
dove saranno disponibili anche le presenti diapositive.

   L. La Rocca (UNIMORE)      Evidenza e incertezza        SEP 2018/2019   16 / 20
Punti di vista

Ritengo8 che un approccio basato sulla stima di parametri sia
più utile di un approccio basato sulla verifica di ipotesi e questo,
nei limiti di questo insegnamento, si traduce in un taglio netto:
nonostante i test di ipotesi siano molto diffusi, preferisco aggirare
un argomento ampio e controverso piuttosto che sfiorarlo.
Chi non gradisse il testo di riferimento (es. lo trovasse troppo stringato)
può aiutarsi con altri testi “per l’ingegneria e le scienze” (vale a dire
“calculus based”) come per esempio
        William Navidi (2006). Probabilità e Statistica per l’Ingegneria
        e le Scienze. McGraw-Hill Italia, Milano.
Sia questo testo (SALA MATEM A.17/811) che il testo di riferimento
(SALA MATEM A.17/807) sono disponibili presso la BSI di UniMoRe.
   8
    in buona compagnia: Alan Agresti & Barbara Finlay (2009). Statistica per le
Scienze Sociali (edizione italiana basata sulla quarta edizione inglese). Pearson.
       L. La Rocca (UNIMORE)        Evidenza e incertezza             SEP 2018/2019   17 / 20
Practice, practice, practice!

L’esame tipicamente inizia con la risoluzione di un esercizio:
soluzioni a quelli del testo di riferimento sono disponibili online
http://www.pearson.it/opera/pearson/21-4121-probabilita_e_statistica_per_ingegneria_e_scienze

nella pagina del libro a cura dell’editore (assieme ad altre risorse);
necessari gli strumenti di base dell’analisi matematica.
Chi fosse interessato a un eserciziario, dove trovare altri esercizi,
svolti per esteso, può fare riferimento al testo
      Manuela Cazzaro & Francesca Greselin (2017).
      Modelli Statistici per l’Analisi di Problemi Economici e Finanziari.
      Pearson Italia, Milano-Torino.
pure disponibile (SALA MATEM A.17/ 870) presso la BSI di UniMoRe.

    L. La Rocca (UNIMORE)              Evidenza e incertezza               SEP 2018/2019   18 / 20
It takes two to tango!

    Trovale da te le tue drizze, le tue scotte
    quelle che in barca non si chiamano mai corde.
    Impara da te o con qualche consiglio amico
    come si imbriglia un velame antico
    e sappi che puoi dare un colpo deciso
    a quella barra che arriva al timone
    e volger così la tua prua in direzione di quel vento
    che ti nega un sorriso. . .

   L. La Rocca (UNIMORE)        Evidenza e incertezza      SEP 2018/2019   19 / 20
Per chi non si accontenta. . .

. . . di orientare lo studio all’esame:
     R Core Team (2018). R: A language and environment for
     statistical computing. R Foundation for Statistical Computing,
     Vienna, Austria. URL https://www.r-project.org.
     RStudio (https://www.rstudio.com)

Seconda lezione: funzionalità di base del software statistico R
nel contesto di una semplice applicazione statistica.

   L. La Rocca (UNIMORE)         Evidenza e incertezza   SEP 2018/2019   20 / 20
Puoi anche leggere