risk of infection following vaccination by single year of age, collected between 1 December 2020 and 31 May 2021. All es

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

risk of infection following vaccination by single year of age, collected between 1 December 2020 and 31 May 2021. All es

Post by answerhappygod »

Risk Of Infection Following Vaccination By Single Year Of Age Collected Between 1 December 2020 And 31 May 2021 All Es 1
Risk Of Infection Following Vaccination By Single Year Of Age Collected Between 1 December 2020 And 31 May 2021 All Es 1 (67.67 KiB) Viewed 45 times
given unfinished python file hope its help the .(pyc) list in
done need help to fix source code with importing (pyc) files thank
you
""" TM112 22D TMA02 Q5
"""
from tma02_stats import median
from tma02_stats import mean
from tma02_stats import corr_coef
""" You can use one of two approaches:
1) add suitable code below and then run this file
2) run this file first then do the calculation in
the
Python interactive shell.
"""
# Estimated risk of infection following vaccination by single year
of age, UK
# 1 December 2020 to 31 May 2021
# Office for National Statistics – Coronavirus (COVID-19)
Infection Survey
age = [16, 17, 18, 19, 20,

21, 22, 23, 24, 25, 26, 27, 28, 29, 30,

31, 32, 33, 34, 35, 36, 37, 38, 39, 40,

41, 42, 43, 44, 45, 46, 47, 48, 49, 50,

51, 52, 53, 54, 55, 56, 57, 58, 59, 60,

61, 62, 63, 64, 65, 66, 67, 68, 69, 70,

71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
81, 82, 83, 84, 85]
# Estimated risk of infection following vaccination
risk = [1.93, 1.88, 1.82, 1.77, 1.73, 1.68, 1.63, 1.59, 1.54,
1.5,
1.46, 1.42, 1.38, 1.35, 1.31, 1.28,
1.25, 1.23, 1.2, 1.18,
1.16, 1.15, 1.13, 1.12, 1.12, 1.11,
1.1, 1.1, 1.1, 1.1, 1.1,
1.1, 1.11, 1.11, 1.11, 1.11, 1.11, 1.1,
1.1, 1.09, 1.07, 1.06,
1.04, 1.02, 1, 0.98, 0.96, 0.94, 0.92,
0.91, 0.89, 0.88, 0.87,
0.86, 0.85, 0.85, 0.84, 0.84, 0.83,
0.83, 0.82, 0.82, 0.81, 0.81,
0.81, 0.8, 0.8, 0.79, 0.79, 0.79]
risk of infection following vaccination by single year of age, collected between 1 December 2020 and 31 May 2021. All estimates are subject to uncertainty, given that a sample is only part of the wider population. These statistics show that the estimated risk of infection decreases with age. For example, for vaccinated people, the risk of infection to those aged 55 is half compared to the 16-year- old. 2.50 2.00 1.50 1.00 0.50 0.00 10 20 70 90 40 50 Age in years Figure 2 Estimated risk of infection following vaccination by single year of age, UK. (December 2020 to May 2021). Note that single year of age (SYOA) demographics are single year of age population (e.g. age 1, age 2, etc.) a. 95.py imports the Python function mean() you used in Block 2 Part 5 to calculate the median of a list of numbers. Use this function to find the mean of age. In your Solution document give the mean. Also provide the Python code you used for calling the mean() function and explain how you executed it. (4 marks) b. The Python file q5.py imports the function corr_coef () which you used in Section 5.4 of Block 2 Part 5 to calculate the correlation coefficient between two lists. i. Use this function to calculate the correlation coefficient between age and risk. In your Solution document, provide the resulting figure rounded manually to two decimal places. Solutions which use Python to round the result will not gain credit. Also provide the Python code you used for calling the corr_coef() function and explain how you executed it. ii. Give the level of correlation, following Table 5.4 (Page 290) in Block 2 Part 5. iii. Briefly discuss whether any effect you have found is likely to be causal. Give one argument for it being causal and one against. The maximum word limit for Question 5.b(iii) is 100 words. Estimated risk (as %) of infection following vaccination
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply