Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Other

Data 8 Resampling and Bootstrap Techniques Assignment

Rating
-
Sold
-
Pages
10
Uploaded on
15-06-2026
Written in
2018/2019

This is a detailed and comprehensive assignment on;Resampling and Bootstrap Techniques for Data 8. An Essential study resource just for you!!

Content preview

Resampling and the Bootstrap

Welcome to lab 7!

In textbook section 9.3 (https://www.inferentialthinking.com/chapters/09/3/empirical-distribution-of-a-
statistic.html), we saw an example of estimation. The British Royal Air Force wanted to know how many
warplanes the Germans had (some number N, a population parameter), and they needed to estimate that
quantity knowing only a random sample of the planes' serial numbers (from 1 to N). For example, one estimate
was twice the mean of the sample serial numbers.

We investigated the random variation in these estimates by simulating sampling from the population many times
and computing estimates from each sample. In real life, if the RAF had known what the population looked like,
they would have known N and would not have had any reason to think about random sampling. They didn't
know what the population looked like, so they couldn't have run the simulations we did. So that was useful as
an exercise in understanding random variation in an estimate, but not as a tool for practical data analysis.

Now we'll flip that idea on its head to make it practical. Given just a random sample of serial numbers, we'll
estimate N, and then we'll use simulation to find out how accurate our estimate probably is, without ever looking
at the whole population. This is an example of statistical inference.

As usual, run the cell below to prepare the lab and the automatic tests.


In[]: # Run this cell to set up the notebook, but please don't change it.

# These lines import the Numpy and Datascience modules.
import numpy as np
from datascience import *

# These lines do some fancy plotting magic.
import matplotlib
%matplotlib inline
import matplotlib.pyplot as plt
plt.style.use('fivethirtyeight')
import warnings
warnings.simplefilter('ignore', FutureWarning)

# These lines load the tests.
from client.api.notebook import Notebook
ok = Notebook('lab07.ok')
_ = ok.auth(inline=True)

, 1. Preliminaries
Remember the setup: We (the RAF in World War II) want to know the number of warplanes fielded by the
Germans. That number is N. The warplanes have serial numbers from 1 to N, so N is also equal to the largest
serial number on any of the warplanes.

We only see a small number of serial numbers (assumed to be a random sample with replacement from among
all the serial numbers), so we have to use estimation.



Question 1.1

Is N a population parameter or a statistic? If we compute a number using our random sample that's an estimate
of N, is that a population parameter or a statistic?



SOLUTION: N is a population parameter, and an estimate is a statistic.



Check your answer with a neighbor or a TA.

To make the situation realistic, we're going to hide the true number of warplanes from you. You'll have access
only to this random sample:


In[]: observations = Table.read_table("serial_numbers.csv")
num_observations = observations.num_rows
observations



Question 1.2

Define a function named plot_serial_numbers to make a histogram of any table of serial numbers. It should
take one argument, a table like observations with one column called "serial number". It should plot a
histogram of the values in the column using bins of width 1 ranging from 1 to 200 but return nothing. Then, call
that function to make a histogram of observations.


In[]: def plot_serial_numbers(numbers):
numbers.hist(bins=np.arange(1, 200+2)) #SOLUTION

# Assuming the lines above produce a histogram, this next
# line may make your histograms look nicer. Feel free to
# delete it if you want.
plt.ylim(0, .25)

plot_serial_numbers(observations)

Written for

Document information

Uploaded on
June 15, 2026
Number of pages
10
Written in
2018/2019
Type
OTHER
Person
Unknown

Subjects

$18.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
anyiamgeorge19 Arizona State University
View profile
Follow You need to be logged in order to follow users or courses
Sold
60
Member since
2 year
Number of followers
16
Documents
2114
Last sold
7 months ago
Scholarshub Store

Scholars Hub provides well-researched, neatly formatted study materials to help you succeed in both online and in-person exams. From exam study guides,summaries and Q&A guides to MCQs, essays, and practice resources, everything is designed to save you time and reduce stress. Created with contributions from students across U.S. universities, our materials are practical, reliable, and exam-focused. Study like a pro. No stress;just results. ✨ Wishing everyone success in all academic pursuits! ✌️

Read more Read less
3.4

5 reviews

5
2
4
0
3
2
2
0
1
1

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions