Question
PYTHON PLEASE HELP, I have attached the q5 and the table 5.4 below. a. i.q5.pyimports the Python functionmedian() you used inBlock 2 Part 5to calculate
PYTHON PLEASE HELP, I have attached the q5 and the table 5.4 below.
a.
i.q5.pyimports the Python functionmedian() you used inBlock 2 Part 5to calculate the median of a list of numbers.
Use this function to find the median of volunteeringHours.
In your Solution document give the median in billions, rounded manually to two decimal places. Also provide the Python code you used for calling themedian()function and explain how you executed it.
ii.Use the function mean() in the same way to calculate the mean of volunteeringHours. Provide the resulting figure manually rounded to two decimal places.
b.The Python fileq5.pyimports the functioncorr_coef()which you used inSection 5.4of Block 2 Part 5 to calculate the correlation coefficient between two lists.
i.Use this function to calculate the correlation coefficient between volunteeringHours and populationAge. Provide the resulting figure manually rounded to two decimal places. ii.Give the level of correlation, following Table 5.4 (Page 290)in Block 2 Part 5.
mun You can use one of two approaches: add suitable code below and then run this file 2) run this file first then do the calculation in the Python interactive shell. # Billions of hours given in volunteering 2005 2014 (ONS) volunteering Hours = [2.28,2.28,2.27,2.19,2.11,2.05,2.05,2.12,2.09,1.97] # Median age of population 2005 - 2014 (ONS) populationAge = [38.7,38.9,39.0, 39.1,39.3,39.5,39.6,39.7,39.9, 40.0)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started