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
Artificial Intelligence> QUESTIONS & ANSWERS > University of California, Berkeley COMPSCI 188. Introduction To Artificial Intelligence Homework 7_Electronic Component. BY gradescope.com/courses. TOTAL POINTS 100 / 100 pts (All)
Gradescope | View Submission https://www.gradescope.com/courses/19415/assignments/84503/submissions/10409235 1/11 Q1 Combining Factors 16 Points Given the factors and what is the resulting factor...
By QuizMaster , Uploaded: Aug 11, 2022
$9
Economics> QUESTIONS & ANSWERS > University of California, Berkeley ECON 119 Econ119+f14+PS1+solutions (All)
Problem Set #1. Due in lecture, no later than 3:50pm, Tuesday, September 9, 2014. Solutions Problem 1. Vera has reference-dependent preferences over mugs, c1, and money, c2 — with reference points...
By d.occ , Uploaded: Sep 19, 2021
$9
Computer Science> QUESTIONS & ANSWERS > University of California, Berkeley CS 61C61C HW5 (All)
Q1 Single-Cycle Datapath 4 Points I think we've had enough of Datapath in Lecture and Discussion (or not), but here, have some more anyways! And no, this homework is not optional. We have reprodu...
By Cheryshev , Uploaded: Jul 20, 2021
$11
Computer Science> QUESTIONS & ANSWERS > University of California, Berkeley DS 100 sp18_hw2_solution.ipynb at master DS-100_sp18 GitHub (All)
Homework 2: Food Safety Course Policies Here are some important course policies. These are also located at http://www.ds100.org/sp18/ (http://www.ds100.org/sp18/). Collaboration Policy Data scienc...
By d.occ , Uploaded: Jul 04, 2021
$13
Physics> QUESTIONS & ANSWERS > University of California, Berkeley PHYSICS 7Ahw01 (All)
PROBLEM (1.23) GIVEN: The diameter of the moon is d moon = 3480 km, and Earth’s diameter is d Earth = 12760 km. GOAL: Find (a) the surface area As of the moon and (b) the ratio of the Earth’s and...
By Expert Tutor , Uploaded: May 16, 2021
$10
Electrical Engineering> QUESTIONS & ANSWERS > University of California, Berkeley - EECS 126hw12-sol (All)
Department of Electrical Engineering and Computer Sciences EECS 126: Probability and Random Processes Problem Set 12 Spring 2018 Self-Graded Scores Due: 5 PM, Friday May 4, 2018 Submit your self-...
By AGRADES , Uploaded: Apr 17, 2021
$6
Electrical Engineering> QUESTIONS & ANSWERS > University of California, Berkeley - EECS 126hw11-sol. (All)
UC Berkeley Department of Electrical Engineering and Computer Sciences EECS 126: Probability and Random Processes Problem Set 11 Spring 2018 Self-Graded Scores Due: 5 PM, Monday April 23, 2018 S...
By AGRADES , Uploaded: Apr 17, 2021
$6
Electrical Engineering> QUESTIONS & ANSWERS > University of California, Berkeley - EECS 126dis12-sol (All)
UC Berkeley Department of Electrical Engineering and Computer Sciences EECS 126: Probability and Random Processes Discussion 12 Spring 2018 1. Hypothesis Testing for Gaussian Distribution Assume...
By AGRADES , Uploaded: Apr 17, 2021
$4
Mathematics> QUESTIONS & ANSWERS > University of California, Berkeley - CS 70 hw13-solution. CS 70 Discrete Mathematics and Probability Theory Spring 2019 . All Solutions Worked. (All)
CS 70 Discrete Mathematics and Probability Theory Spring 2019 Babak Ayazifar and Satish Rao HW 13 1 Markov’s Inequality and Chebyshev’s Inequality A random variable X has variance var(X) = 9 and ex...
By Kirsch , Uploaded: Apr 16, 2021
$13
Mathematics> QUESTIONS & ANSWERS > Questions and Answers > University of California, Berkeley - CS 70 hw11-solution. CS 70 Discrete Mathematics and Probability Theory Fall 2019. All Solutions Worked. (All)
CS 70 Discrete Mathematics and Probability Theory Fall 2019 Alistair Sinclair and Yun S. Song HW 11 Note: This homework consists of two parts. The first part (questions 1-4) will be graded and will...
By Kirsch , Uploaded: Apr 16, 2021
$13
Connected school, study & course
About the document
Uploaded On
Oct 02, 2022
Number of pages
9
Written in
This document has been written for:
Uploaded
Oct 02, 2022
Downloads
0
Views
39
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·