Agenda Informationer Opsamling fra sidst Deskriptiv statistik

Slides:



Advertisements
Similar presentations
Agenda Informationer –G-mails til Klaus –Brug supplerende litt. –Åben Excel (Opsamling fra sidst) Deskriptiv statistik –Teori –Små øvelser i Excel Videre.
Advertisements

BPS - 5th Ed. Chapter 21 Describing Distributions with Numbers.
Describing Quantitative Variables
Chapter 2 Exploring Data with Graphs and Numerical Summaries
Descriptive Measures MARE 250 Dr. Jason Turner.
Statistics It is the science of planning studies and experiments, obtaining sample data, and then organizing, summarizing, analyzing, interpreting data,
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 2 Exploring Data with Graphs and Numerical Summaries Section 2.2 Graphical Summaries.
EXPLORING DATA WITH GRAPHS AND NUMERICAL SUMMARIES
Exploratory Data Analysis (Descriptive Statistics)
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 2 Exploring Data with Graphs and Numerical Summaries Section 2.1 Different Types of.
Chapter 1 Introduction Individual: objects described by a set of data (people, animals, or things) Variable: Characteristic of an individual. It can take.
Business Statistics: A Decision-Making Approach, 7e © 2008 Prentice-Hall, Inc. Chap 3-1 Business Statistics: A Decision-Making Approach 7 th Edition Chapter.
Chapter 2: Exploring Data with Graphs and Numerical Summaries
B a c kn e x t h o m e Classification of Variables Discrete Numerical Variable A variable that produces a response that comes from a counting process.
CHAPTER 1: Picturing Distributions with Graphs
CHAPTER 2: Describing Distributions with Numbers
Descriptive Statistics  Summarizing, Simplifying  Useful for comprehending data, and thus making meaningful interpretations, particularly in medium to.
Agresti/Franklin Statistics, 1 of 63 Chapter 2 Exploring Data with Graphs and Numerical Summaries Learn …. The Different Types of Data The Use of Graphs.
AP Statistics Chapters 0 & 1 Review. Variables fall into two main categories: A categorical, or qualitative, variable places an individual into one of.
Programming in R Describing Univariate and Multivariate data.
Describing distributions with numbers
Descriptive Statistics  Summarizing, Simplifying  Useful for comprehending data, and thus making meaningful interpretations, particularly in medium to.
Chapter 1 Exploring Data
Let’s Review for… AP Statistics!!! Chapter 1 Review Frank Cerros Xinlei Du Claire Dubois Ryan Hoshi.
Variable  An item of data  Examples: –gender –test scores –weight  Value varies from one observation to another.
© 2008 Brooks/Cole, a division of Thomson Learning, Inc. 1 Chapter 4 Numerical Methods for Describing Data.
1 Laugh, and the world laughs with you. Weep and you weep alone.~Shakespeare~
Chapter 2 Describing Data.
Describing distributions with numbers
Categorical vs. Quantitative…
To be given to you next time: Short Project, What do students drive? AP Problems.
Agresti/Franklin Statistics, 1 of 63 Chapter 2 Exploring Data with Graphs and Numerical Summaries Learn …. The Different Types of Data The Use of Graphs.
Chapter 3 Looking at Data: Distributions Chapter Three
1 Chapter 2: Exploring Data with Graphs and Numerical Summaries Section 2.1: What Are the Types of Data?
1 Descriptive Statistics 2-1 Overview 2-2 Summarizing Data with Frequency Tables 2-3 Pictures of Data 2-4 Measures of Center 2-5 Measures of Variation.
1 Chapter 4 Numerical Methods for Describing Data.
Copyright © 2011 Pearson Education, Inc. Describing Numerical Data Chapter 4.
UNIT #1 CHAPTERS BY JEREMY GREEN, ADAM PAQUETTEY, AND MATT STAUB.
Using Measures of Position (rather than value) to Describe Spread? 1.
LIS 570 Summarising and presenting data - Univariate analysis.
1 Never let time idle away aimlessly.. 2 Chapters 1, 2: Turning Data into Information Types of data Displaying distributions Describing distributions.
Descriptive Statistics Unit 6. Variable Any characteristic (data) recorded for the subjects of a study ex. blood pressure, nesting orientation, phytoplankton.
1 By maintaining a good heart at every moment, every day is a good day. If we always have good thoughts, then any time, any thing or any location is auspicious.
Describing Data Week 1 The W’s (Where do the Numbers come from?) Who: Who was measured? By Whom: Who did the measuring What: What was measured? Where:
Compilation of student responses on last Wednesday’s warm up “Statistics is…” The larger the word, the more often it was used in a student’s definition.
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 2 Exploring Data with Graphs and Numerical Summaries Section 2.1 Different Types of.
UNIT ONE REVIEW Exploring Data.
Exploring Data Descriptive Data
Exploratory Data Analysis
Exploring Data Descriptive Data
Statistical Reasoning
NUMERICAL DESCRIPTIVE MEASURES
Description of Data (Summary and Variability measures)
Laugh, and the world laughs with you. Weep and you weep alone
Chapter 3 Describing Data Using Numerical Measures
DAY 3 Sections 1.2 and 1.3.
Histograms: Earthquake Magnitudes
Chapter 1: Exploring Data
Chapter 1: Exploring Data
Honors Statistics Review Chapters 4 - 5
Chapter 1: Exploring Data
Chapter 1: Exploring Data
Chapter 1: Exploring Data
Chapter 1: Exploring Data
Chapter 1: Exploring Data
Chapter 1: Exploring Data
Chapter 1: Exploring Data
Chapter 1: Exploring Data
Chapter 1: Exploring Data
Chapter 1: Exploring Data
Presentation transcript:

Agenda Informationer Opsamling fra sidst Deskriptiv statistik Bedst på Nettet Forslag til eksamensopg. Opsamling fra sidst Spørgsmålstyper Svaralternativer Skalaer Gruppeopgaven Deskriptiv statistik Hvordan var litteraturen til i dag? Opgave 1, gruppeind-deling og dagens øvelse

Exploring Data with Graphs and Numerical Summaries Know the definition of variable Know the definition and key features of a categorical versus a quantitative variable Know the definition of a discrete versus a continuous quantitative variable Know the definition of frequency, proportion (relative frequencies), and percentages Create Frequency Tables

Variable A variable is any characteristic that is recorded for the subjects in a study Examples: Eye color, Number of siblings, Height A variable can be classified as either Categorical (kategoriseret / kvalitativ), or Quantitative (Discrete, Continuous) Give examples from the ”usability world” ∙ Population ∙ ∗ ∗ ∙ ∙ ∙ ∙ ∗ ∙ ∙ ∙ ∙ ∗ ∗ ∙ ∙

Categorical Variable A variable can be classified as categorical if each observation belongs to one of a set of categories, Examples: Gender (Male or Female) Religious Affiliation (Catholic, Jewish, …) Type of residence (Apt, Condo, …) Belief in Life After Death (Yes or No) Examples from the usability world

Quantitative Variable A variable is called quantitative if observations on it take numerical values that represent different magnitudes of the variable Examples: Age Number of siblings Annual Income Examples from the usability world

Main Features of Quantitative and Categorical Variables For Quantitative variables: Key features are the center and spread (variability) For Categorical variables: A key feature is the percentage of observations in each of the categories Levels of measurement (nominal, ordinal, interval and ratio)

Discrete Quantitative Variable A quantitative variable is discrete if its possible values form a set of separate numbers, such as 0,1,2,3,…, Discrete variables have a finite number of possible values Examples: Number of pets in a household Number of children in a family Number of foreign languages spoken by an individual Examples from the usability world

Continuous Quantitative Variable A quantitative variable is continuous if its possible values form an interval Continuous variables have an infinite number of possible values Examples: Height/Weight Age Blood pressure Examples from the usability world

Opgave #1 Identify the variable type as either categorical or quantitative Number of siblings in a family County of residence Distance (in miles) of commute to school Marital status 1 quantitative 2 categorical 3 quantitative 4 categorical

Opgave #2 Identify each of the following variables as continuous or discrete Length of time to take a test Number of people waiting in line Number of speeding tickets received last year Your dog’s weight 1, Continuous 2, Discrete 3, Discrete 4, Continuous

Proportion & Percentage (Relative Frequencies) The proportion of the observations that fall in a certain category is the frequency (count) of observations in that category divided by the total number of observations Frequency of that class Sum of all frequencies The Percentage is the proportion multiplied by 100, Proportions and percentages are also called relative frequencies,

Frequency, Proportion, & Percentage Example If 4 students received a “10” out of 40 students, then, 4 is the frequency 4/40 = 0,10 is the proportion (and relative frequency) 10% is the percentage 0,1+*100=10%

Frequency Table A frequency table is a listing of possible values for a variable, together with the number of observations and / or relative frequencies for each value

Opgave #3 På et webbureau holder man øje med antallet af billeder på en række toneangivende hjemmesider, I en periode har webbureauet først statistik med, om antallet af billeder på forsiden af hjemmesiderne er højere, uændret eller mindre, Resultaterne var: Flere: 21 Uændret: 7 Færre: 12 Spørgsmål: Hvilken variabel interesserer webbureauet sig for? Hvilken slags variabel er det? Udregn andelene i Excel!

Exploring Data with Graphs and Numerical Summaries Distribution Graphs for categorical data: bar graphs and pie charts Graphs for quantitative data: dot plot, stem-leaf, and histogram Constructing a histogram Interpreting a histogram Displaying Data over Time: time plots

Distribution A graph or frequency table describes a distribution, A distribution tells us the possible values a variable takes as well as the occurrence of those values (frequency or relative frequency)

Graphs for Categorical Variables Use pie charts and bar graphs to summarize categorical variables Pie Chart: A circle having a “slice of pie” for each category Bar Graph: A graph that displays a vertical bar for each category

Pie Charts Pie charts: Used for summarizing a categorical variable Drawn as a circle where each category is represented as a “slice of the pie” The size of each pie slice is proportional to the percentage of observations falling in that category Draw a pie chart for the web bureau data!

Bar Graphs Bar graphs are used for summarizing a categorical variable Bar Graphs display a vertical bar for each category The height of each bar represents either counts (“frequencies”) or percentages (“relative frequencies”) for that category Usually easier to compare categories with a bar graph than with a pie chart Draw a bar graph for the web bureau data!

Histograms A histogram is a graph that uses bars to portray the frequencies or the relative frequencies of the possible outcomes for a quantitative variable, Make a histogram with 12 observations

Interpreting Histograms Overall pattern consists of center, spread, and shape Assess where a distribution is centered by finding the median (50% of data below median 50% of data above), Assess the spread of a distribution, Shape of a distribution: roughly symmetric, skewed to the right, or skewed to the left

Shape Symmetric Distributions: if both left and right sides of the histogram are mirror images of each other A distribution is skewed to the left if the left tail is longer than the right tail A distribution is skewed to the right if the right tail is longer than the left tail

Examples of Skewness

Shape and Skewness Consider a data set of the scores of students on a very easy exam in which most score very well but a few score very poorly: What shape would you expect a histogram of this data set to have? Symmetric Skewed to the left Skewed to the right Bimodal

Time Plots Used for displaying a time series, a data set collected over time, Plots each observation on the vertical scale against the time it was measured on the horizontal scale, Points are usually connected, Common patterns in the data over time, known as trends, should be noted,

Exploring Data with Graphs and Numerical Summaries Calculating the mean Calculating the median Comparing the Mean & Median Definition of Resistant Know how to identify the mode of a distribution

Mean (gennemsnittet) The mean is the sum of the observations divided by the number of observations n betegner antallet af observationer (stikprøvestørrelsen) y1, y2, y3, … yi ,..., yn betegner de n observationer betegner gennemsnittet It is the center of mass. Do it in Excel

Median The median is the midpoint of the observations when they are ordered from the smallest to the largest (or from the largest to smallest) Order observations If the number of observations is: Odd, then the median is the middle observation Even, then the median is the average of the two middle observations

______________________________ Median 1) Sort observations by size, n = number of observations ______________________________ 2,a) If n is odd, the median is observation (n+1)/2 down the list  n = 9 (n+1)/2 = 10/2 = 5 Median = 99 2,b) If n is even, the median is the mean of the two middle observations n = 10  (n+1)/2 = 5,5 Median = (99+101) /2 = 100

Find the mean and median in Excel Det gns. tidsforbrug (sek.), som det tager at indlæse nyheder på en app fra 8 nyhedssider: 2,3 1,1 19,7 9,8 1,8 1,2 0,7 0,2 Hvad er mean og median? Mean = 4,6 Median = 1,5 Mean = 4,6 Median = 5,8 Mean = 1,5 Median = 4,6 Hvad sker der med gns. og median, hvis den største observation ganges med 10?

Comparing the Mean and Median The mean and median of a symmetric distribution are close together, For symmetric distributions, the mean is typically preferred because it takes the values of all observations into account

Comparing the Mean and Median In a skewed distribution, the mean is farther out in the long tail than is the median For skewed distributions the median is preferred because it is better representative of a typical observation

Resistant Measures A numerical summary measure is resistant if extreme observations (outliers) have little, if any, influence on its value The Median is resistant to outliers The Mean is not resistant to outliers Hvis I kun kan få én oplysning om løn-niveauet i en virksomhed, vil I så have gennemsnittet eller medianen?

Exploring Data with Graphs and Numerical Summaries Calculate the range (variationsbredden) Calculate the standard deviation Know the properties of the standard deviation, s Know how to interpret the standard deviation, s: The Empirical Rule

Range One way to measure the spread is to calculate the range. The range is the difference between the largest and smallest values in the data set; Range = max  min The range is strongly affected by outliers

Standard Deviation Each data value has an associated deviation from the mean, A deviation is positive if it falls above the mean and negative if it falls below the mean The sum of the deviations is always zero

Standard Deviation Gives a measure of variation by summarizing the deviations of each observation from the mean and calculating an adjusted average of these deviations

Standard Deviation Find the mean Find the deviation of each value from the mean Square the deviations Sum the squared deviations Divide the sum by n-1

Standard Deviation Antallet af besøgende på en hjemmeside i løbet af 7 dage: 1792, 1666, 1362, 1614, 1460, 1867, 1439

Standard Deviation Observations Deviations Squared deviations 1792 17921600 = 192 (192)2 = 36,864 1666 1666 1600 = 66 (66)2 = 4,356 1362 1362 1600 = -238 (-238)2 = 56,644 1614 1614 1600 = 14 (14)2 = 196 1460 1460 1600 = -140 (-140)2 = 19,600 1867 1867 1600 = 267 (267)2 = 71,289 1439 1439 1600 = -161 (-161)2 = 25,921 Sum = 0 Sum = 214,870

Properties of the Standard Deviation s measures the spread of the data s = 0 only when all observations have the same value, otherwise s > 0, As the spread of the data increases, s gets larger, s has the same units of measurement as the original observations, The variance=s2 has units that are squared s is not resistant, Strong skewness or a few outliers can greatly increase s,

Magnitude of s: Empirical Rule

Exploring Data with Graphs and Numerical Summaries Obtaining quartiles and the 5 number summary Calculating interquartile range and detecting potential outliers Drawing boxplots Comparing Distributions Calculating a z-score

Percentile The pth percentile is a value such that p percent of the observations fall below or at that value

Finding Quartiles Splits the data into four parts Arrange the data in order The median is the second quartile, Q2 The first quartile, Q1, is the median of the lower half of the observations The third quartile, Q3, is the median of the upper half of the observations

Measure of spread: quartiles Quartiles divide a ranked data set into four equal parts. The first quartile, Q1, is the value in the sample that has 25% of the data at or below it and 75% above The second quartile is the same as the median of a data set, 50% of the obs are above the median and 50% are below The third quartile, Q3, is the value in the sample that has 75% of the data at or below it and 25% above Q1= first quartile = 2,2 M = median = 3,4 We are going to start out with a very general way to describe the spread that doesn’t matter whether it is symmetric or not - quartiles, Just as the word suggests - quartiles is like quarters or quartets, it involves dividing up the distribution into 4 parts, Now, to get the median, we divided it up into two parts, To get the quartiles we do the exact same thing to the two halves, Use same rules as for median if you have even or odd number of observations, Now, what an we do with these that helps us understand the biology of these diseases? Q3= third quartile = 4,35

Quartile Example Find the first and third quartiles Number of downloaded apps the last 10 days: 2 4 11 13 14 15 31 32 34 47 What is the correct answer? Q1 = 2 Q3 = 47 Q1 = 12 Q3 = 31 Q1 = 11 Q3 = 32 Q1 =12 Q3 = 33

Calculating Interquartile range The interquartile range is the distance between the third quartile and first quartile: IQR = Q3  Q1 IQR gives spread of middle 50% of the data

Criteria for identifying an outlier An observation is a potential outlier if it falls more than 1,5 x IQR below the first quartile or more than 1,5 x IQR above the third quartile

5 Number Summary The five-number summary of a dataset consists of the Minimum value First Quartile Median Third Quartile Maximum value

Boxplot A box goes from the Q1 to Q3 A line is drawn inside the box at the median A line goes from the lower end of the box to the smallest observation that is not a potential outlier and from the upper end of the box to the largest observation that is not a potential outlier The potential outliers are shown separately

Comparing Distributions Box Plots do not display the shape of the distribution as clearly as histograms, but are useful for making graphical comparisons of two or more distributions

Z-Score The z-score for an observation is the number of standard deviations that it falls from the mean An observation from a bell-shaped distribution is a potential outlier if its z-score < -3 or > +3