Programming > QUESTIONS & ANSWERS > University of California, Berkeley DATA MISC Homework 08 Confidence Intervals (All)
hw08 October 25, 2018 1 Homework 8: Confidence Intervals Reading: * Estimation Please complete this notebook by filling in the cells provided. Before you begin, execute the following cell to load... the provided tests. Each time you start your server, you will need to execute this cell again to load the tests. Homework 8 is due Thursday, 10/25 at 11:59pm. You will receive an early submission bonus point if you turn in your final submission by Wednesday, 10/24 at 11:59pm. Start early so that you can come to office hours if you’re stuck. Check the website for the office hours schedule. Late work will not be accepted as per the policies of this course. Directly sharing answers is not okay, but discussing problems with the course staff or with other students is encouraged. Refer to the policies page to learn more about how to learn cooperatively. For all problems that you must write our explanations and sentences for, you must provide your answer in the designated space. Moreover, throughout this homework and all future ones, please be sure to not re-assign variables throughout the notebook! For example, if you use max_temperature in your answer to one question, do not reassign it later on. In [27]: # Don't change this cell; just run it. 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) from client.api.notebook import Notebook ok = Notebook('hw08.ok') _ = ok.auth(inline=True) ===================================================================== Assignment: Homework 8: Confidence Intervals 1OK, version v1.12.5 ===================================================================== Successfully logged in as [email protected] 1.1 1. Plot the Vote Four candidates are running for President of Dataland. A polling company surveys 1000 people selected uniformly at random from among voters in Dataland, and it asks each one who they are planning on voting for. After compiling the results, the polling company releases the following proportions from their sample: Candidate Proportion Candidate C 0.47 Candidate T 0.38 Candidate J 0.08 Candidate S 0.03 Undecided 0.04 These proportions represent a uniform random sample of the population of Dataland. We will attempt to estimate the corresponding population parameters, or the proportion of the votes that each candidate received from the entire population. We will use confidence intervals to compute a range of values that reflects the uncertainty of our estimate. The table votes contains the results of the survey. Candidates are represented by their initials. Undecided voters are denoted by U. In [28]: votes = Table().with_column('vote', np.array(['C']*470 + ['T']*380 + ['J']*80 + ['S']* num_votes = votes.num_rows votes.sample() Out[28]: vote TJCCSTCCCT ... (990 rows omitted) Question 1. Below, complete the given code that will use bootstrapped samples from votes to compute estimates of the true proportion of voters who are planning on voting for Candidate C. Make sure that you understand what’s going on here. It may be helpful to explain proportions_in_resamples to a friend or TA. 2In [37]: def proportions_in_resamples(): prop_c = make_array() for i in np.arange(5000): bootstrap = votes.sample() single_proportion = np.count_nonzero(bootstrap.column('vote') == 'C') / num_vo prop_c = np.append(prop_c, single_proportion) return prop_c In the following cell, we run the function you just defined, proportions_in_resamples, and create a histogram of the calculated statistic for the 5,000 bootstraps. Based on what the original polling proportions were, does the graph seem reasonable? Talk to a friend or ask a TA if you are unsure! In [38]: sampled_proportions = proportions_in_resamples() Table().with_column('Estimated Proportion', sampled_proportions).hist(bins=np.arange(0 3Question 2. Using the array sampled_proportions, find the values that bound the middle 95% of the values in the data. (Compute the lower and upper ends of the interval, named c_lower_bound and c_upper_bound, respectively.) [Show More]
Last updated: 1 year ago
Preview 1 out of 9 pages
Programming> QUESTIONS & ANSWERS > University of California, Berkeley DATA MISC Homework 9: Central Limit Theorem (All)
University of California, Berkeley DATA MISC 1 Homework 9: Central Limit Theorem Reading: * Why the mean matters Please complete this notebook by filling in the cells provided. Before you begi...
By QuizMaster , Uploaded: Oct 02, 2022
$9
Programming> QUESTIONS & ANSWERS > University of California, Berkeley DATA MISC Homework 6: Probability, Simulation, Estimation, and Assessing Models (All)
Homework 6: Probability, Simulation, Estimation, and Assessing Models Reading: Randomness (https://www.inferentialthinking.com/chapters/09/randomness.html) Sampling and Empirical Distributions (ht...
By QuizMaster , Uploaded: Oct 01, 2022
$9
Programming> QUESTIONS & ANSWERS > University of California, Berkeley DATA MISC Homework 10: Linear Regression (All)
University of California, Berkeley DATA MISC Homework 10: Linear Regression Reading: Prediction (https://www.inferentialthinking.com/chapters/15/prediction.html) 1. Triple Jump Distances vs....
By QuizMaster , Uploaded: Oct 02, 2022
$9
Programming> QUESTIONS & ANSWERS > WGU C779 Web Development Foundations Questions and Answers Graded A+ (All)
MIME (Multipurpose Internet Mail Extensions) ✔✔A protocol that enables operating systems to map file name extensions to corresponding applications. Also used by applications to automatically process...
By clairel^ , Uploaded: Jan 27, 2023
$8
Programming> QUESTIONS & ANSWERS > WGU C777 - Practice Test C Questions and Answers with Verified Solutions (All)
WGU C777 - Practice Test C Questions and Answers with Verified Solutions Because mobile devices have smaller screens, you must lay out your pages differently than you would for a page that will be...
By Nutmegs , Uploaded: Sep 14, 2022
$10
Programming> QUESTIONS & ANSWERS > WGU C777 Web Development Applications – Already Graded A (All)
WGU C777 Web Development Applications – Already Graded A App ✔✔Relatively small applications developed exclusively for mobile devices <nav> ✔✔structure element in HTML5 that includes hypertext menu...
By Nutmegs , Uploaded: Sep 14, 2022
$10
Programming> QUESTIONS & ANSWERS > WGU C777 Web Development Applications Pre-Assessment Latest 2022 (All)
WGU C777 Web Development Applications Pre-Assessment Latest 2022 The HTML5 specification for the <audio> element does not require a specific audio codec to be supported, but it does support three...
By Nutmegs , Uploaded: Sep 14, 2022
$8
Programming> QUESTIONS & ANSWERS > 06 eLMS Activity 2 – ARG Latest Update Q&A 2022 (All)
1. Briefly explain the purpose of Open Shortest Path First in routing. OSPF (Open Shortest Path First) is an Internet Protocol (IP) routing protocol. It is part of the set of internal gateway proto...
By Exammate , Uploaded: Aug 04, 2023
$4.5
Programming> QUESTIONS & ANSWERS > ASU CSE 110 Exam 1 with 100% Correct Answers Updated & Verified (All)
ASU CSE 110 Exam 1 with 100% Correct Answers Updated & Verified Which of the following refers to a collection of programs that a computer executes? ✔✔ Software Computers are machines that ✔✔ execu...
By Crescent , Uploaded: Jan 02, 2023
$9
Programming> QUESTIONS & ANSWERS > Questions and Answers > 2019 Latest passapply 1Z0-071 PDF and VCE dumps Download. Pass Oracle 1Z0-071 Exam with 100% Guarantee (All)
2019 Latest passapply 1Z0-071 PDF and VCE dumps Download 1Z0-071Q&As Oracle Database 12c SQL Pass Oracle 1Z0-071 Exam with 100% Guarantee Free Download Real Questions & Answers PDF and VCE file fr...
By QuizMaster , Uploaded: Feb 12, 2021
$9.5
Connected school, study & course
About the document
Uploaded On
Oct 01, 2022
Number of pages
9
Written in
This document has been written for:
Uploaded
Oct 01, 2022
Downloads
0
Views
29
Avoid resits and achieve higher grades with the best study guides, textbook notes, and class notes written by your fellow students
Your fellow students know the appropriate material to use to deliver high quality content. With this great service and assistance from fellow students, you can become well prepared and avoid having to resits exams.
Your fellow student knows the best materials to research on and use. This guarantee you the best grades in your examination. Your fellow students use high quality materials, textbooks and notes to ensure high quality
Get paid by selling your notes and study materials to other students. Earn alot of cash and help other students in study by providing them with appropriate and high quality study materials.
In Browsegrades, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.
We're available through e-mail, Twitter, Facebook, and live chat.
FAQ
Questions? Leave a message!
Copyright © Browsegrades · High quality services·