hw03

pdf

School

Skyline College *

*We aren’t endorsed by this school

Course

MISC

Subject

Statistics

Date

Feb 20, 2024

Type

pdf

Pages

14

Uploaded by MasterBuffalo3986

Report
Question 5. In the code cell below, create a visualization that will help us determine if there is an association between birth rate and death rate during this time interval. It may be helpful to create an intermediate table containing the birth and death rates for each state. (4 Points) Things to consider: • What type of chart will help us illustrate an association between 2 variables? • How can you manipulate a certain table to help generate your chart? • Check out the Recommended Reading for this homework! In [120]: # In this cell, use birth_rates and death_rates to generate your visualization birth_rates_2015 = pop . column( 'BIRTHS' ) / pop . column( '2015' ) death_rates_2015 = pop . column( 'DEATHS' ) / pop . column( '2015' ) birth_death = Table() . with_column( 'Birth Rates' , birth_rates_2015) . with_column( 'Death Rates' , d birth_death . scatter( 'Birth Rates' , 'Death Rates' ) 1
2
Question 1. Produce a histogram that visualizes the distributions of all ride times in Boston using the given bins in equal_bins . (4 Points) Hint: See Chapter 7.2 if you’re stuck on how to specify bins. In [124]: equal_bins = np . arange( 0 , 120 , 5 ) boston . hist( 'ride time' , bins = equal_bins) 3
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
4
Question 2. Now, produce a histogram that visualizes the distribution of all ride times in Manila using the given bins. (4 Points) In [125]: equal_bins = np . arange( 0 , 120 , 5 ) manila . hist( 'ride time' , bins = equal_bins) # Don't delete the following line! plt . ylim( 0 , 0.05 ); 5
6
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Question 6. Identify one difference between the histograms, in terms of the statistical properties. > Hint : Without performing any calculations, can you comment on the average or skew of each histogram? (4 Points) Boston has a higher percentage but we can’t comment on the average of each histogram because there isn’t enough information because it’s not specific like a scatter plot. 7
8
Question 7. Why is your solution in Question 6 the case? Based on one of the following two readings, why are the distributions for Boston and Manila different? (4 Points) Boston reading Manila reading Hint: Try thinking about external factors of the two cities that may be causing the difference! The readings provide some potential factors – try to connect them to the ride time data. Ride time is normally higher during certain seasons in Boston, whereas Manila has a lower time because traffc isn’t regulated all throughout the months 9
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
10
Question 2. State at least one reason why you chose the histogram from Question 1. Make sure to clearly indicate which histogram you selected (ex: “I chose histogram A because …”). (5 Points) I chose Histogram A because on both sides of the scatter plot most of the data points were between -2 all the way till 3. And in both clusters of data they meet or are plotted, more towards the middle. 11
12
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Question 4. State at least one reason why you chose the histogram from Question 3. Make sure to clearly indicate which histogram you selected (ex: “I chose histogram A because …”). (5 Points) I just looked at the y values and there was not much data between -0.5 & 0.5 which is reflected in histogram b because of the gap in the middle 13
14