Intro to Statistics with R: Introduction

Report 2 Downloads 110 Views
Intro to Statistics with R: Introduction

Histograms & distributions

Intro to Statistics with R: Introduction

Histograms ●

Simple, but useful and informative



Used to display a distribution

Intro to Statistics with R: Introduction

Body temperature example

Intro to Statistics with R: Introduction

Body temperature example

Intro to Statistics with R: Introduction

Summary

> # The hist() function hist(Temperature, breaks = 6)

Intro to Statistics with R: Introduction

Let’s Practice!

Intro to Statistics with R: Introduction

Looking at distributions by using histograms (1/2)

Intro to Statistics with R: Introduction

Body temperature example ●

A few school children have influenza (flu)



High body temperature



Distribution positively skewed

Intro to Statistics with R: Introduction

Histogram: Body temperature °F Positive skew

Intro to Statistics with R: Introduction

Histogram: Body temperature °C Positive skew

Intro to Statistics with R: Introduction

Body temperature example ●

All individuals in sample sick with flu



Treated with antibiotics



Suppressed body temperature



Compare to second (untreated) group

Intro to Statistics with R: Introduction

Histogram: Body temperature °F

Intro to Statistics with R: Introduction

Histogram: Body temperature °F

Intro to Statistics with R: Introduction

Histogram: Body temperature °C

Intro to Statistics with R: Introduction

Histogram: Body temperature °C

Intro to Statistics with R: Introduction

Let's Practice!

Intro to Statistics with R: Introduction

Looking at distributions by using histograms (2/2)

Intro to Statistics with R: Introduction

Histograms ●

Not all distributions are normal



Histogram reveals normal distribution (or not)



Let's look at more histograms!

Intro to Statistics with R: Introduction

Wine ratings example ●

100 wine experts



Rate quality (1-100) of 8 different wines



4 red wines and 4 white wines



Higher scores = higher quality

Intro to Statistics with R: Introduction

Wine ratings example ●

4 countries, 2 wines each (one red, one white) ●

Argentina



Australia



France



USA

Malbec & Chardonnay Shiraz & Pinot Grigio

Bordeaux & Sauvignon Blanc Cabernet & Riesling

Intro to Statistics with R: Introduction

Wine ratings example ●

Red wines ratings normal



White wines ratings not normal

Intro to Statistics with R: Introduction

Let's Practice!

Intro to Statistics with R: Introduction

Quick summary

Intro to Statistics with R: Introduction

Summary ●

Histograms used to display distributions



Many distributions are normal



But…

Intro to Statistics with R: Introduction

Summary ●

Some distributions not normal, for example: ●

Bimodal



Positively skewed



Negatively skewed



Uniform (platykurtic)



High peak (leptokurtic)

Intro to Statistics with R: Introduction

Congratulations!