Presentation on theme: "Objectives (BPS chapter 1)"— Presentation transcript:
1 Objectives (BPS chapter 1) Picturing Distributions with GraphsWhat is Statistics ?Individuals and variablesTwo types of data: categorical and quantitativeWays to chart categorical data: bar graphs and pie chartsWays to chart quantitative data: histograms and stemplotsInterpreting histogramsTime plots
2 Individuals and Variables Statistics ?Statistics is the science of dataIndividuals and VariablesIndividuals are the objects described by a set of data. Individuals may be people, but they may also be animals or things.A variable is any characteristic of an individual. A variable can take different values for different individuals.In modern society, people like to collect data. For example, during this summer I would like to collect the data of your name, your school, your major, and scores for each homework, quiz, midterm and final exam. Or, for another example, some people in UPMC would like to collect every detail measurements when they conduct some experiment; Or Big company would like to collect the evaluation of selling of their products. The thing collecting data is only the first step we take. We collect data because we want to know more. We need valuable information from the data we collected, and we need more than they look like. To avoid reveal to much thoughts of mine about the course, I am going to use the selling record in big company as an example. They collect data and analyze them, evaluate them, get inference from them, so that they are able to make some decision like keep some promotions and change some strategies to sell their products in a best way. So, this is a kind of statistics for. We are dealing with these data, analyze them, make decisions based on them.
3 Example: A data set layout This is a typical data set layout. As we can see, the data in each row belong to a subject, or we also call an individual. In each column, although they generally take different values, the data describe the same characteristic of every individual listed in the table, we give a title of each characteristic like Name, School, and so on. We call them variables.
4 Two types of variables A variable can be either A categorical variable places an individual into one of several groups or categories. What can be counted is the count or proportion of individuals in each category.orA quantitative variable takes numerical values for which arithmetic operations such as adding and averaging make sense.The distribution of a variable tells us what values it takes and how often it takes these values.
5 ExampleData from a medical study contain values of many variables for each of the people who were the subjects of the study. Which of the following variables are categorical and which are quantitative?Gender (female or male) --- CategoricalAge (years) --- QuantitativeRace (black, white or other) --- CategoricalSmoker (yes or no) --- CategoricalSystolic blood pressure --- QuantitativeLevel of calcium in the blood --- QuantitativeSystolic blood pressure (millimeters of mercury)Level of calcium in the blood (micrograms per milliliter)
6 Ways to chart categorical data Because the variable is categorical, the data in the graph can be ordered any way we want (alphabetical, by increasing value, by year, by personal preference, etc.).Bar graphs Each category is represented by a bar.Pie charts Peculiarity: The slices must represent the parts of one whole.A pie chart must include all the categories that make up a whole. Use a pie chart only when you want to emphasize each category’s relation to the whole.
7 Example: Top 10 causes of death in the United States, 2001 RankCauses of deathCountsPercent of top 10sPercent of total deaths1Heart disease700,14237%29%2Cancer553,76823%3Cerebrovascular163,5389%7%4Chronic respiratory123,0136%5%5Accidents101,5374%6Diabetes mellitus71,3723%7Flu and pneumonia62,0348Alzheimer’s disease53,8522%9Kidney disorders39,48010Septicemia32,2381%All other causes629,96726%For each individual who died in the United States in 2001, we record what was the cause of death. The table above is a summary of that information.
8 Bar graphsEach category is represented by one bar. The bar’s height shows the count (or sometimes the percentage) for that particular category.Top 10 causes of death in the U.S., 2001The number of individuals who died of an accident in 2001 is approximately 100,000.
9 Pie charts Each slice represents a piece of one whole. The size of a slice depends on what percent of the whole this category represents.Percent of people dying fromtop 10 causes of death in the U.S., 2000Another way to graphically illustrate the same categorical data is using a Pie Chart.Here is listed in order, and can see relative proportions as pieces of pie.Notice here that we have changed from the numbers of people dying to the percent of people dyingTo make a pie chart, typically use percentages, and they have to add up to one, or you won’t have the whole pie.
10 Ways to chart quantitative data Histograms and stemplotsThese are summary graphs for a single variable. They are very useful to understand the pattern of variability in the data.Line graphs: time plotsUse when there is a meaningful sequence, like time. The line connecting the points helps emphasize any change over time.Other graphs to reflect numerical summaries (see chapter 2)
12 HistogramsThe range of values that a variable can take is divided into equal-size intervals.The histogram shows the number of individual data points that fall in each interval.The first column represents all states with a percent Hispanic in their population between 0% and 4.99%. The height of the column shows how many states (27) have a percent Hispanic in this range.The last column represents all states with a percent Hispanic between 40% and 44.99%. There is only one such state: New Mexico, at 42.1% Hispanic.
13 Interpreting histograms When describing a quantitative variable, we look for the overall pattern and for striking deviations from that pattern. We can describe the overall pattern of a histogram by its shape, center, and spread.Histogram with a line connecting each column too detailedHistogram with a smoothed curve highlighting the overall pattern of the distribution
14 Most common distribution shapes Symmetric distributionA distribution is symmetric if the right and left sides of the histogram are approximately mirror images of each other.Skewed distributionA distribution is skewed to the right if the right side of the histogram (side with larger values) extends much farther out than the left side. It is skewed to the left if the left side of the histogram extends much farther out than the right side.Complex, multimodal distributionNot all distributions have a simple overall shape, especially when there are few observations.
15 OutliersAn important kind of deviation is an outlier. Outliers are observations that lie outside the overall pattern of a distribution. Always look for outliers and try to explain them.The overall pattern is fairly symmetrical except for two states clearly not belonging to the main trend. Alaska and Florida have unusual representation of the elderly in their population.A large gap in the distribution is typically a sign of an outlier.This is from the book. Imagine you are doing a study of health care in the 50 US states, and need to know how they differ in terms of their elderly population.This is a histogram of the number of states grouped by the percentage of their residents that are 65 or over.You can see there is one very small number and one very large number, with a gap between them and the rest of the distribution.Values that fall outside of the overall pattern are called outliers. They might be interesting, they might be mistakes - I get those in my data from typos in entering RNA sequence data into the computer.They might only indicate that you need more samples. Will be paying a lot of attention to them throughout class both for what we can learn about biology and also because they can cause trouble with your statistics.Guess which states they are (florida and Alaska).AlaskaFlorida
16 Stem plots How to make a stem plots: Separate each observation into a stem, consisting of all but the final (rightmost) digit, and a leaf, which is that remaining final digit. Stems may have as many digits as needed, but each leaf contains only a single digit.Write the stems in a vertical column with the smallest value at the top, and draw a vertical line at the right of this column.Write each leaf in the row to the right of its stem, in increasing order out from the stem.Original data: 9, 9, 22, 32, 33, 39, 39, 42, 49, 52, 58, 70STEMLEAVES
17 Percent of Hispanic residents in each of the 50 states Step 1:Sort the dataPercent of Hispanic residents in each of the 50 statesStep 2:Assign the values to stems and leaves
18 Time PlotsTime plots are for variables measured over time and it is all about changes over time.A time plot of a variable plots each observation against the time at which it was measured. Always put time on the horizontal scale of your plot and the variable you are measuring on the vertical scale. Connecting the data points by line helps emphasize any change over time
19 ExampleHow have college tuition and fees changed over time?
20 Time PlotTime plot of the average tuition paid by students at public and private college foe academic year to