213f15lec2 (1)

Upload: markydee20

Post on 07-Jul-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/19/2019 213f15lec2 (1)

    1/26

    Lecture 2: Displaying distributions

    AR de LeonDepartment of Mathematics and Statistics

    University of Calgary

    Fall 2015 AR de Leon U of Calgary Sept 11, 2015 1/26

  • 8/19/2019 213f15lec2 (1)

    2/26

    “At least 1.75 billion reasons to go into statistics”

    Prof. Susan A. MurphyDepartment of StatisticsUniversity of Michigan

    “Every time we have gured out a new way to collect data, there is

    an explosion in both the need for statisticians and great excitement for what can be done with the data...We have all these new ways to collect data via wearable sensors, the Internet, genetics, astronomy,and more, and it’s creating all kinds of new problems for data scientists to solve.”

    Fall 2015 AR de Leon U of Calgary Sept 11, 2015 2/26

  • 8/19/2019 213f15lec2 (1)

    3/26

    “Quantifying global international migration ows”

    Science, March 2014 Fall 2015 AR de Leon U of Calgary Sept 11, 2015 3/26

  • 8/19/2019 213f15lec2 (1)

    4/26Fall 2015 AR de Leon U of Calgary Sept 11, 2015 4/26

  • 8/19/2019 213f15lec2 (1)

    5/26Fall 2015 AR de Leon U of Calgary Sept 11, 2015 5/26

  • 8/19/2019 213f15lec2 (1)

    6/26Fall 2015 AR de Leon U of Calgary Sept 11, 2015 6/26

  • 8/19/2019 213f15lec2 (1)

    7/26

    On measurement

    Denition

    We measure a property of a person or thing when we assign a numberto represent the property.

    Some instrument is often used to make a measurement.

    We can usually choose in what unit to record our measurements.Denition

    A variable is the numerical result of measurement; it takes different valuesfor people or things that differ in the property we are measuring.

    Denition

    A variable is a valid measure of a property if it is a relevant/appropriaterepresentation of that property.

    Fall 2015 AR de Leon U of Calgary Sept 11, 2015 7/26

  • 8/19/2019 213f15lec2 (1)

    8/26Fall 2015 AR de Leon U of Calgary Sept 11, 2015 8/26

  • 8/19/2019 213f15lec2 (1)

    9/26Fall 2015 AR de Leon U of Calgary Sept 11, 2015 9/26

  • 8/19/2019 213f15lec2 (1)

    10/26Fall 2015 AR de Leon U of Calgary Sept 11, 2015 10/26

  • 8/19/2019 213f15lec2 (1)

    11/26Fall 2015 AR de Leon U of Calgary Sept 11, 2015 11/26

  • 8/19/2019 213f15lec2 (1)

    12/26Fall 2015 AR de Leon U of Calgary Sept 11, 2015 12/26

  • 8/19/2019 213f15lec2 (1)

    13/26Fall 2015 AR de Leon U of Calgary Sept 11, 2015 13/26

  • 8/19/2019 213f15lec2 (1)

    14/26

    Histograms are not unique!

    All 3 histograms are of the same data created with the same width 10

    for the classes but with different lower class limits for the rst class.Fall 2015 AR de Leon U of Calgary Sept 11, 2015 14/26

  • 8/19/2019 213f15lec2 (1)

    15/26

    Fall 2015 AR de Leon U of Calgary Sept 11, 2015 15/26

  • 8/19/2019 213f15lec2 (1)

    16/26

    Fall 2015 AR de Leon U of Calgary Sept 11, 2015 16/26

  • 8/19/2019 213f15lec2 (1)

    17/26

    Histogram examples

    The right-hand histogram is right-skewed , suggesting that Shakespeare’splays contain many short words (up to six letters) and few very long words.

    Fall 2015 AR de Leon U of Calgary Sept 11, 2015 17/26

  • 8/19/2019 213f15lec2 (1)

    18/26

    Distribution of heights of OKCupid users

    Fall 2015 AR de Leon U of Calgary Sept 11, 2015 18/26

    “ i l ll i li d i ” ( O d 20 0)

  • 8/19/2019 213f15lec2 (1)

    19/26

    “Lies people tell in online dating” ( OKTrends , 2010)

    Fall 2015 AR de Leon U of Calgary Sept 11, 2015 19/26

    M l f l i OKC id ( D l 2014)

  • 8/19/2019 213f15lec2 (1)

    20/26

    Males vs. females in OKCupid ( Dataclysm , 2014)

    “Two-thirds of male messages go to the best-looking third of women. So basically, guys are ghting each other 2-for-1 for the absolute best-rated females.”

    “Women rate an incredible 80% of guys as worse-looking than

    medium.” Fall 2015 AR de Leon U of Calgary Sept 11, 2015 20/26

    I ’ l !

  • 8/19/2019 213f15lec2 (1)

    21/26

    It’s not always pretty!

    Fall 2015 AR de Leon U of Calgary Sept 11, 2015 21/26

    O tli

  • 8/19/2019 213f15lec2 (1)

    22/26

    Outliers

    Fall 2015 AR de Leon U of Calgary Sept 11, 2015 22/26

  • 8/19/2019 213f15lec2 (1)

    23/26

    Fall 2015 AR de Leon U of Calgary Sept 11, 2015 23/26

    A histogram you may nd personally interesting

  • 8/19/2019 213f15lec2 (1)

    24/26

    A histogram you may nd personally interesting...

    Fall 2015 AR de Leon U of Calgary Sept 11, 2015 24/26

    Displays for categorical data

  • 8/19/2019 213f15lec2 (1)

    25/26

    Displays for categorical data

    Bar charts of OKCupid users by categorical variables sex (male of female) and by sexual orientation (straight, bisexual or gay).

    A mosaic plot summarizing OKCupidusers by both sex and sexualorientation .

    Fall 2015 AR de Leon U of Calgary Sept 11, 2015 25/26

    Practice exercises

  • 8/19/2019 213f15lec2 (1)

    26/26

    Practice exercises

    Exercise 1.36

    Exercise 1.38Exercise 1.39

    Exercise 1.41

    Exercise 1.43Exercise 1.46

    Fall 2015 AR de Leon U of Calgary Sept 11, 2015 26/26