Population: a group of individuals or objects we are interested in studying
Parameter: a numerical quantity derived from the population (almost always unknown)
If we had data from every unit in the population, we could just calculate population parameters and be done!
Unfortunately, we usually cannot do this, so we draw conclusions from
Sample: a subset of our population of interest
Statistic: a numerical quantity derived from a sample
Naturally, it makes sense to use the sample mean (and other quantities derived from the sample) to make generalizations about the population mean.
Statistical inference is the process of using sample data to make conclusions about the underlying population the sample came from.
Estimation: using the sample to estimate a plausible range of values for the unknown parameter
Testing: evaluating whether our observed sample provides evidence for or against some claim about the population
Statistical inference is the process of using sample data to make conclusions about the underlying population the sample came from.
Estimation: using the sample to estimate a plausible range of values for the unknown parameter
Testing: evaluating whether our observed sample provides evidence for or against some claim about the population
Today we will focus on Estimation.
Research question: What is the mean price per guest per night among Airbnb rentals with at least ten reviews in Asheville (zip codes 28801 - 28806)?
Population of interest: listings in Asheville with at least ten reviews.
Research question: What is the mean price per guest per night among Airbnb rentals with at least ten reviews in Asheville (zip codes 28801 - 28806)?
Population of interest: listings in Asheville with at least ten reviews.
Parameter of interest: mean price per guest per night among these listings.
Research question: What is the mean price per guest per night among Airbnb rentals with at least ten reviews in Asheville (zip codes 28801 - 28806)?
Population of interest: listings in Asheville with at least ten reviews.
Parameter of interest: mean price per guest per night among these listings.
We have data on the price per guest (ppg
) for a random sample of 50 Airbnb listings
with at least ten reviews in Asheville, NC, that were active on June 25, 2020 (Source: http://insideairbnb.com/).
Research question: What is the mean price per guest per night among Airbnb rentals with at least ten reviews in Asheville (zip codes 28801 - 28806)?
Population of interest: listings in Asheville with at least ten reviews.
Parameter of interest: mean price per guest per night among these listings.
We have data on the price per guest (ppg
) for a random sample of 50 Airbnb listings
with at least ten reviews in Asheville, NC, that were active on June 25, 2020 (Source: http://insideairbnb.com/).
Research question: What is the mean price per guest per night among Airbnb rentals with at least ten reviews in Asheville (zip codes 28801 - 28806)?
Population of interest: listings in Asheville with at least ten reviews.
Parameter of interest: mean price per guest per night among these listings.
We have data on the price per guest (ppg
) for a random sample of 50 Airbnb listings
with at least ten reviews in Asheville, NC, that were active on June 25, 2020 (Source: http://insideairbnb.com/).
Sample: randomly selected 50 listings in the Asheville with at least ten reviews.
Statistic: mean price per guest per night among these sampled listings.
A point estimate is a single value computed from the sample data to serve as the "best guess", or estimate, for the population parameter.
abb <- read_csv("data/asheville.csv")abb %>% summarize(mean_price = mean(ppg))
## # A tibble: 1 × 1## mean_price## <dbl>## 1 76.6
If you want to estimate a population parameter, do you prefer to report a single value or a range of values the parameter might be in?
If you want to estimate a population parameter, do you prefer to report a single value or a range of values the parameter might be in?
If we report a point estimate, we probably won’t hit the exact population parameter.
If we report a range of plausible values, we have a good shot at capturing the parameter.
A plausible range of values for the population parameter is a confidence interval.
In order to construct a confidence interval we need to quantify variability (uncertainty) of our sample statistic.
For example, if we want to construct a confidence interval for a population mean, we need to come up with a plausible range of values around our observed sample mean.
This range will depend on how precise and how accurate our sample mean is as an estimate of the population mean.
Quantifying this requires a measurement of how much we would expect the sample mean to vary from sample to sample.
There is almost always some variability of sample statistics because random samples may differ from each other.
If we took another random sample of 50 Airbnb listings in Asheville, we probably wouldn't get the same mean price per guest.
There is almost always some variability of sample statistics because random samples may differ from each other.
If we took another random sample of 50 Airbnb listings in Asheville, we probably wouldn't get the same mean price per guest.
Suppose we split the class in half and ask each student their height. Then, we calculate the mean height of students on each side of the classroom. Would you expect these two means to be exactly equal, close but not equal, or wildly different?
There is almost always some variability of sample statistics because random samples may differ from each other.
If we took another random sample of 50 Airbnb listings in Asheville, we probably wouldn't get the same mean price per guest.
Suppose we split the class in half and ask each student their height. Then, we calculate the mean height of students on each side of the classroom. Would you expect these two means to be exactly equal, close but not equal, or wildly different?
Suppose you randomly sample 50 students and 5 of them are left handed. If you were to take another random sample of 50 students, how many would you expect to be left handed? Would you be surprised if only 3 of them were left handed? Would you be surprised if 40 of them were left handed?
We can quantify the variability of sample statistics using different approaches:
or
We can quantify the variability of sample statistics using different approaches:
or
Today we will focus on Booststrapping.
The term bootstrapping comes from the phrase "pulling oneself up by one’s bootstraps", which is a metaphor for accomplishing an impossible task without any outside help.
Impossible task: Estimating a population parameter using data from only the given sample
Note: This notion of saying something about a population parameter using
only information from an observed sample is the crux of statistical inference,
not limited to bootstrapping.
Take a bootstrap sample: a random sample taken with replacement from the original sample, of the same size as the original sample.
Calculate the bootstrap statistic: the statistic you’re interested in (the mean, the median, the correlation, etc.) computed on the bootstrap sample.
Take a bootstrap sample: a random sample taken with replacement from the original sample, of the same size as the original sample.
Calculate the bootstrap statistic: the statistic you’re interested in (the mean, the median, the correlation, etc.) computed on the bootstrap sample.
Repeat steps (1) and (2) many times to create a bootstrap distribution: a distribution of bootstrap statistics.
Take a bootstrap sample: a random sample taken with replacement from the original sample, of the same size as the original sample.
Calculate the bootstrap statistic: the statistic you’re interested in (the mean, the median, the correlation, etc.) computed on the bootstrap sample.
Repeat steps (1) and (2) many times to create a bootstrap distribution: a distribution of bootstrap statistics.
Calculate the bounds of the XX% confidence interval as the middle XX% of the bootstrap distribution.
Take a bootstrap sample: a random sample taken with replacement from the original sample, of the same size as the original sample.
Calculate the bootstrap statistic (in this case, the sample mean) using the bootstrap sample.
Do steps 1 and 2 over and over again to create a bootstrap distribution of sample means.
In this plot, we've taken 1,000 bootstrap samples, calculated the sample mean for each, and plotted them in a histogram.
Here we compare the bootstrap distribution of sample means to that of the original data. What do you notice?
Calculate the bounds of the bootstrap interval by using percentiles of the bootstrap distribution.
Calculate the bounds of the bootstrap interval by using percentiles of the bootstrap distribution.
The 95% confidence interval for the mean price per guest per night
among Airbnb rentals with at least ten reviews in Asheville is ($64, $90).
Watch videos for Prepare: June 1
Mid-course feedback on Sakai due Fridy, June 3 at 11:59pm
Kick-off of the final project! Read intructions carefully
Project proposal due Friday, June 3 at 11:59pm
Lab 04 due tonight at 11:59pm
Keyboard shortcuts
↑, ←, Pg Up, k | Go to previous slide |
↓, →, Pg Dn, Space, j | Go to next slide |
Home | Go to first slide |
End | Go to last slide |
Number + Return | Go to specific slide |
b / m / f | Toggle blackout / mirrored / fullscreen mode |
c | Clone slideshow |
p | Toggle presenter mode |
t | Restart the presentation timer |
?, h | Toggle this help |
Esc | Back to slideshow |