# Stat 185¶

## Statistics vs data science¶

Check out Wikipedia's article on Data Science. Quoting from that article, I guess that

## So...¶

### just what is this hot, new field?¶

• According to the same Wikipedia article, data science is a "concept to unify statistics, data analysis and their related methods" (Wikipedia cites a prominent text).
• According to page 8 of our textbook, "Statistics is the study of how best to collect, analyze, and draw conclusions from data".
• More blunlty, Nate Silver says that data science is "sexed-up term for statistics".

## Why so hot?¶

Statistics (or data science, if you want) is hot for good reason. Data is becoming easier and easier to come by and it's impact more and more pervasive. Think

That's quite a variety of fields! Maybe that's why I recently stumbled on this article (written by a physician) asserting that statistics may be the most important class that you'll ever take.

## What if I'm just an ordinary person?¶

What if you're not interested in being a techie or a doctor or anything like that? What if you just want to be an ordinary person?

### You're extraordinary!¶

First off, if you complete your goal of obtaining a college degree, you're not exactly an "ordinary" person. By my estimates, barely 31% of US adults have a bachelor's degree or higher. Of course, only some fraction of those folks have taken a statistics class so, in a sense, you're already approaching the data elite!

### Do you read the newspaper?¶

You really need some level of quantitative literacy in general and statistical literacy in particular to be an informed citizen these days. Politics these days provides all kinds of examples. Here are just a few examples:

## A look at some actual data¶

One major objective of this class to learn to deal with real world data. So let's start by taking a look at our class data.

Note that, as we go through these examples, we'll meet several important concepts from section 1.2 of our text whose title is Data Basics.

### Getting and examining the data¶

I've collected the results of our class survey and the last few lines look something like so:

Response ID How old are you? How tall are you? [Feet] How tall are you? [Inches] Are you left or right handed? What is your gender (optional): Choose your eye color Choose your eye color [Other] What is your major? Where is your hometown?
28 31 19 5 3 Right Female Blue NaN Computer Science looks like: 35.6,-82.55
29 32 18 5 8 Right Female Brown NaN Mass Communications looks like: 35.6,-82.55
30 33 18 5 9 Right Female Blue NaN undecided looks like: 35.6,-82.55
31 34 19 5 4 Right Female Hazel NaN health and wellness looks like: 35.6,-82.55
32 35 20 5 7 Right Male Blue NaN Political Science looks like: 35.6,-82.55

That's actual data, though I've set everyone's hometown to Asheville for privacy purposes.

### Data tables¶

The result of our import is called a data table or data frame.

Each row in a data table is called an observation and corresponds to a case in our study.

Each column corresponds to a variable or characteristic associated with the cases.

There are two main types of data and both types can be further classified into two sub-types.

• Numerical data, which can be
• Discrete or
• Continuous
• Categorical data, which can be
• Nominal or
• Ordinal

### Histograms for numerical data¶

We can get and understanding of what numerical data looks like by examining a histogram.

### Box plots for numerical data¶

Alernatively, we might look at box plot, that illustrates the so-called five-point summary of

min, 1st quartile, median, 3rd quartile, and max.

### A pie chart for categorical data¶

Lots of people seem to love pie charts for categorical data. I only favor pie charts when comparing two values of a categorical variable.

### A bar chart for categorical data¶

An better way to look at categorical data is with a bar chart, which makes it much easier to compare two values that are quite close to one another.

### Comparing variables¶

Sometimes we'll want to find if there's a relationship between two variables. In the following side-by-side boxplot, we examine how the relationshipe between gender and height.

### Geographic data¶

Geographic data is of tremendous importance and is often best illustrated on a map. Here's what the actual answers to the hometown question looks like:

Make this Notebook Trusted to load map: File -> Trust Notebook

## The objectives of Statistics¶

One simple characterization of statistics is

the study of how to collect, analyze, and draw conclusions from data.

Note the three parts:

• Collect: Using experiments or observational studies,
• Analyze:
• Qualitatively - often using graphs
• Quantitatively - often using computations from probability theory
• Draw conclusions: The process of inference

### Collecting data¶

Collecting data often boils down to designing an experiment or observational study.

• An observational study is one where the data collection does not interfere with how the data arises. Examples include surveys and reviews of records.
• In an experiment, researchers actively work with the samples applying treatments and observing effects. Medical researchers, for example, might study the efficacy of a vaccine where a large random sample of patients is broken into a treatment group and non-treatment group; researchers then compare the outcomes of the two groups

We'll talk a lot more about getting data next time.

### Analyzing data¶

The images we've seen today allow us to draw rough qualitative conclusions about the data we see. Quantiative analysis is more numerical. For example, 2 out of the 33 people in the class are left handed, or about 6%.

This is more precise information than we could glean from a pie chart.

### Inference¶

Ultimately, we want to draw inferences or conclusions from data. To do so, it helps to have a little terminology:

• Population refers to the complete set of entities under consideration,
• Sample refers to some subset of the population,
• Parameter refers to some summary characteristic of the population, and
• Statistic refers to some summary characteristic computed from a sample.

The main question is: once you've computed a statistic from a sample, what might that tell you about the corresponding parameter for the whole population?

For example, I guess that 6.66% of our class is left handed. We could take that as an approximation to the number of left handed folks in the whole population. How accurate an approximation might we expect that to be?