Introduction to data Science with Python

Coursera-Applied Data Science with Python-Introduction to Data Science in Python-assignment2第二周作业 ------最近在上密歇根大学开的python应用数据科学 Applied Data Science with Python ------这个课比较适合有编程基础的人 ------第二周的作业,总共有8道题 提交系统时不时会抽风导致明明只错了一两题但是显示0分。。。所以大家上传的时候耐心一点哈~ anyway,小透明分享一下自己写的答案,均测试通过,可以参考哈~ 就不复习课程内容了== ... 阅读详情
FINAL ASSESEMENT. Introduction to data Science with Python
General Instructions
This is the final assessment for the course. You need to download the datasets provided
to answer the questions.
The 5 datasets named 'World_Happiness_Report' (there is one for each year of data) are
used for Part A of this Assessment which corresponds to Modules 3 to 5, and account for
50% of the grade of the assessment.
The dataset 'Air Passengers' is used in the final part of the assessment, which
correspond to module 6 and account to 20% of the grade.
Modules 1 and 2 are implicitly evaluated as part of the assessment, as you are expected
to use Python and Jupyter notebooks for data analysis and presentation. The
correctness, quality and clarity of your code will account for 20% of the grade.
You are supposed to complete the assessment using a Jupyter Notebook. You should use
the notebook to load the data, perform the calculations, and present the results using
Markdown or text cells. The clarity and presentation of the notebook will also be part of
the grading criteria (10% of the grade).
When you finish the assessment, please submit the .ipynb notebook. Make sure that all
cells work correctly, as the professor will re-run all cells before evaluating the
assessment. To simplify the correction process, please place the data files in the same
directory as the Jupyter notebook. This way, the cells loading the data files will work
directly in the professor's environment without the need to change the file path.
IMPORTANT
Put your name and your student code (if you know it) at the beginning of your jupyter
notebook, and is possible, also as the title of the notebook. For instance
Final_Assesment_Planas_Bielsa_240784.ipynb
==================================================
PART A- Understanding the Sources of Happiness
(datasets used: all 5 CSV files - World Happiness Report_yyyy.csv)
Context:
The 'World Happiness Report' dataset is a comprehensive collection of data that
measures happiness levels in different countries worldwide. It provides valuable
insights into the factors that contribute to happiness and offers a global perspective on
well-being. The dataset includes various variables that assess economic indicators,
social support, health, freedom, trust, and generosity, among other factors. With observations spanning multiple years, it allows for temporal analysis and identification
of happiness trends across different countries.
Each entry in the dataset represents a specific country and contains a wealth of
information for comparative analysis. Researchers, policymakers, and individuals
interested in understanding happiness levels can leverage this dataset to explore the
underlying factors and their variations across different regions. By analysing the World
Happiness Report dataset, one can gain insights into the determinants of happiness and
uncover potential strategies to promote well-being and enhance the quality of life
worldwide.
To perform the analysis, you should load all five CSV files corresponding to the years
2015 to 2019 into your Jupyter Notebook. These datasets will provide the necessary
data to answer the questions and gain a comprehensive understanding of happiness
trends and influencing factors across different years.
QUESTIONS PART A
Descriptive Statistics
1) Identify and describe the types of variables present in the World Happiness Report
dataset. Categorize each variable as discrete, categorical, ordinal, or continuous.
2) Calculate the mean, median, variance, and standard deviation for each continuous
variable in the dataset for each year from 2015 to 2019.
3) Create a separate line plot for each continuous variable, showing the temporal
evolution of the mean from 2015 to 2019. Each plot should have the year on the x-axis
and the mean on the y-axis.
4) Generate two histograms in the same plt.figure, one for the Happiness Score in 2015
and another for the Happiness Score in 2019. Discuss any observed differences or
similarities.
5) Calculate the correlation coefficients between the Happiness_Index and the
continuous variables (economy, family, health, freedom, trust, generosity). For each
year, which variable has the highest positive correlation with happiness and which
variable has the highest negative correlation with happiness.
Modelling (Use LinearRegression model from the scikit-learn library)
1) For each year in the dataset, create a unidimensional linear model where the
independent variable is one of the factors (economy, family, health, freedom, trust,
generosity), and the dependent variable is the happiness score. Report the coefficients
and intercept for each linear model and calculate the coefficient of determination (R^2)
for each model.
2) Identify which variable explains the happiness score better by itself for each year. Is
this variable the same every year, or does it vary?3) Build a multidimensional linear model using all the variables (economy, family,
health, freedom, trust, generosity) as independent variables and the happiness score as
the dependent variable for each year. Then, compare the accuracy of the
multidimensional model with the unidimensional models. Does the inclusion of all
variables improve the accuracy of the model?
Inference and Hypothesis Testing
1) Consider the population to consist of all the countries listed. For the 2019 data,
randomly select a sample of 30 countries from the population. Compute a 95%
confidence interval for the sample mean of The Happiness score.
2) When constructing the dataset, various variables were considered, including the
annual sunshine duration in hours for each country. Although the data was not
ultimately included, we know that the standard deviation of the values was 200 hours.
The newspaper claimed that the population average was 2500 hours or less. To
investigate this claim, a new measurement was conducted last year on a small sample of
50 countries randomly selected, and the sample average was found to be 2580 hours.
Formulate the null and alternative hypotheses to test the claim and determine whether
this should be a one-sided or two-sided test. Based on the sampled data, state whether
the null hypothesis should be rejected or not.
==================================================
PART B - Forecasting air passengers.
(dataset used: AirPassengers.csv)
Context:
Part B of this Assessment focuses on the famous 'Air Passengers' dataset, which
provides monthly data on the number of air passengers from 1949 to 1960. This dataset
is commonly used in time series analysis and forecasting tasks and it presents a valuable
opportunity to study the trends and patterns in air travel over a specific time period.
allowing for the exploration of various time series analysis techniques. This dataset is
particularly useful in understanding the growth, seasonality, and long-term trends in air
travel demand.
By analysing the 'Air Passengers' dataset, we can gain insights into the factors that
influence air travel, identify patterns in passenger behaviour, and make predictions
about future passenger numbers. This dataset is widely used in the field of
transportation analysis, helping airlines, airports, and policymakers make informed
decisions about capacity planning, marketing strategies, and resource allocation.
QUESTIONS PART B
Time Series
1. load the dataset and plot the time series. Which decomposition method do you think
will be more appropriate for this dataset? Additive or multiplicative? reason your
answer. 2 Perform a seasonal decomposition of the "Air Passengers" dataset using the method
that you selected as more appropriate in your previous answer. Visualize the trend,
seasonality, and residual components. make a plot(or several plots) to show all different
components of the time series.
3 Can you estimate a prediction for the number of passengers in December 1961?
================END ASSESMENT ==============================
Acknowledgement of data sources.
The “Happiness Report dataset”, which is an open source dataset freely available to the public. The World
Happiness Report is an annual publication by the Sustainable Development Solutions Network, and the
dataset can be accessed from their official website or platforms like Kaggle.
The 'Air Passengers' dataset is a publicly available dataset widely used in time series analysis. The 'Air
Passengers' dataset provides monthly data on the number of air passengers from 1949 to 1960 and is
often used as a benchmark dataset for forecasting and analysing time series data. The dataset can be
accessed from various sources, including the 'datasets' package in Python's seaborn library or other
online data repositories."
Coursera | Applied Data Science with Python专项课程 | Introduction to Data Science in Python 本文为学习笔记,记录了由University of Michigan推出的Coursera专项课程——Applied Data Science with Python中Course One: Introduction to Data Science in Python全部Assignment代码。 阅读详情

相关推荐

Coursera | Introduction to Data Science in Python(University of Michigan)| Quiz答案

Coursera | Introduction to Data Science in Python(University of Michigan)| quiz答案quiz答案Week1 : Fundamentals of Data Manipulation with PythonWeek2 : Basic Data Processing with PandasWeek3 : More Data Processing with Pandas    继续Coursera学习哈,有助学金申请还是比较爽的(有需求下

小鱼干的博客 2万+

探索数据科学新边界:《Introduction to Data Science》项目深度解析

探索数据科学新边界:《Introduction to Data Science》项目深度解析 在这个大数据和人工智能的时代,数据科学成为了理解和解决问题的关键工具。 在 GitCode 上开源的 项目,正是一个为初学者和进阶者设计的全面数据科学教程,旨在帮助你掌握数据科学的核心技能。 项目简介 《Introduction to Data Science》项目是一个综合性的学习资源,涵盖了数据预处...

gitblog_00015的博客 409

Introduction to Data Science in Python 第 4 周 Assignment

Assignment 4 - Hypothesis Testing This assignment requires more individual learning than previous assignments - you are encouraged to check out the pandas documentation to find functions or methods yo...

PatrickZheng的博客 1895

下载!Springer 面向公众开放数据挖掘、编程、机器学习、数学、深度学习、数据科学等 65本电子书籍...

点击上方“逆锋起笔”,关注领取视频教程☞ 程序员进阶必备资源免费送「各种技术!」 ☜转载自 | AINLP施普林格(Springer)是世界著名的科技期刊、图书出版公司,这次特殊时期期间...

code小生 1827

Coursera | Introduction to Data Science in Python(University of Michigan)| Assignment1

Coursera | Introduction to Data Science in Python(University of Michigan)| Assignment1Assignment 1Part ACode结果Part BCode结果Part CCode结果    u1s1,这门课的assignment还是有点难度的,特别是assigment4(哀怨),放给大家参考啦~    有时间(需求)就把所有代码放到github上(好担心被河蟹啊)    先放下该课程其他相关链接:    Coursera

小鱼干的博客 1万+

Coursera | Introduction to Data Science in Python(University of Michigan)| Assignment4

Coursera | Introduction to Data Science in Python(University of Michigan)| Assignment4Assignment 4DescriptionNotesQuestion 1Code结果Question 2Code结果Question 3Code结果Question 4Code结果Question 5Code结果    u1s1,这门课的assignment还是有点难度的,特别是assigment4(哀怨),放给大家参考啦~    有

小鱼干的博客 2万+

Coursera-Applied Data Science with Python-Introduction to Data Science in Python-Week3

一、Merging Dataframes:

KevinZ5111的博客 2178

[Coursera | Introduction to Data Science in Python] Assignment 4 - Hypothesis Testing

作为一个近乎小白的新玩家,旁听的这个课又无法提交,想来想去还是发出来留个纪念嘻嘻。 Assignment 4 - Hypothesis Testing This assignment requires more individual learning than previous assignments - you are encouraged to check out thepandas d...

jiaoyiru的博客 6138

Coursera-Applied Data Science with Python-Introduction to Data Science in Python-Week2

一、The Series Data Structure:在pandas中,Series是一个一维的类似的数组对象,它包含一个数组数据(任何numpy数据类型)和一个与数组关联的索引。为了方便理解,你可以把Series看着是一个有序字典。其中索引是连续的,从0开始。1.创建Series:    以list创建Series:import pandas as pd animals = ['Tiger',...

KevinZ5111的博客 1889

行政数据分析大屏实战:用Tableau从Excel到看板的完整搭建流程(含数据连接与字段计算避坑)

本文详细介绍了如何利用Tableau从Excel数据源搭建行政数据分析大屏的完整流程,涵盖数据准备、连接技巧、计算字段优化、看板设计及动态交互部署。通过五阶工作流,帮助用户高效处理多源异构数据,实现业务洞察与可视化呈现,提升行政数据分析效率。

weixin_29696711的博客 344

态路小课堂丨三款800G光模块方案介绍—SR8/DR8/2FR4

800G QSFP-DD 2FR4光模块使用CWDM4波长(1271/1291/1311/1331nm),单通道速率为100G,通过MUX减小光纤的数目,其光学接口采用CS接口或双芯LC接口。

poposu的博客 2391

Coursera-Applied Data Science with Python-Introduction to Data Science in Python-Week1

一、Data Science:

KevinZ5111的博客 1071

【2021最新版】Dubbo面试题总结(40道题含答案解析)

文章目录1、为什么要用Dubbo?2、Dubbo的整体架构设计有哪些分层?3、默认使用的是什么通信框架,还有别的选择吗?4、服务调用是阻塞的吗?5、一般使用什么注册中心?还有别的选择吗?6、默认使用什么序列化框架,你知道的还有哪些?7、服务提供者能实现失效踢出是什么原理?8、服务上线怎么不影响旧版本?9、如何解决服务调用链过长的问题?10、说说核心的配置有哪些?11、Dubbo推荐用什么协议?12、同一个服务多个注册的情况下可以直连某一个服务吗?13、画一画服务注册与发现的流程图?14、Dubbo集群容错有

程序媛小琬的博客 1万+

探索数据科学世界:《Introduction to Data Science with Python》开源书籍

探索数据科学世界:《Introduction to Data Science with Python》开源书籍 去发现同类优质开源项目:https://gitcode.com/ 项目简介 在大数据和人工智能的时代,学习数据科学成为了一项必备技能。为此,我们很荣幸地向您推荐这一开源项目。这是一本由DataScienceUB团队编写的教程,旨在帮助初学者通过Python语言掌握数据科学的基础知识。 技...

gitblog_00007的博客 500

SCCM部署教程:(3)SCCM安装

这两则摘要介绍了WSUS和SCCM的安装步骤: WSUS安装:通过服务器管理器添加"Windows服务器更新服务"角色,选择SQL数据库并指定安装路径,验证数据库连接后完成安装。 SCCM安装:先运行预检工具Prereqchk.exe,选择主站点安装类型,配置语言、站点代码和名称,设置SQL数据库连接参数(保留默认端口4022),选择通信方法和系统角色(管理点和分发点),最后完成约1小时的安装过程。 两则安装指南都强调要确保数据库配置与前期准备一致,并提供了关键配置选项的说明。

小V锅的专栏 920

Win10下YOLOv8环境搭建避坑指南:从CUDA 11.6到cuDNN配置全流程

本文详细介绍了在Windows 10系统下搭建YOLOv8环境的完整流程,包括CUDA 11.6和cuDNN的配置步骤,以及常见问题的解决方案。通过硬件准备、软件安装、环境验证和性能优化等环节,帮助开发者高效完成YOLOv8环境配置,提升目标检测项目的开发效率。

defi6farmer的博客 226

【Python】Section 1: 线性回归 Linear Regression from HarvardX “Introduction to Data Science with Python“

HarvardX CS109x "Introduction to Data Science with Python"\Section 1: Linear Regression

Yqalu的博客 1453

YOLO26涨点改进 | 独家创新,注意力改进篇 | AAAI 2025 | YOLO26引入 DRM 防御优化模块,进行特征优化/特征增强,助力目标检测、图像分类、图像分割有效涨点

本文提出了一种基于DRM防御优化模块改进的YOLO26网络模型,显著提升了目标检测的鲁棒性和特征提取能力。DRM模块通过优化特征提取过程、增强抗噪声能力和补充细节信息,有效提高了模型在复杂场景下的检测精度和定位准确度。该模块可集成于UNet等主干网络,采用Transformer结构实现特征精炼,在对抗攻击环境下仍能保持稳定的融合效果。实验表明,改进后的模型在红外与可见光图像融合任务中表现出色,同时提升了下游任务性能。文章详细介绍了DRM模块的结构、作用机制及实现代码,并提供了两种YOLO26改进方案.

Ai缝合怪、助力小伙伴高效发论文 146

Introduction to Data Science in Python Week3

Week 3 : Advanced Python PandasMerging DataframesPandas IdiomsGroup bySplitApply Merging Dataframes When we want to join the DataFrames together, we have some choices to make. outer join: a union. In ...

momo的博客 845

Android RIL(Radio Interface Layer)全面概述和知识要点(3万字长文)

在 Android 系统这个庞大而复杂的体系里,RIL(Radio Interface Layer,无线接口层)绝对是个关键角色。简单来讲,它就像一座桥梁,一头连着手机基带,另一头接着上层应用 ,在应用程序和调制解调器(Modem)之间搭建起了信息交流的通道。想象一下,咱们在手机上点击拨号按钮,或者编辑一条短信发送出去,这些操作产生的请求并不会直接到达手机的基带处理器。而是先由 RIL 接手,它把这些来自上层应用程序的请求,像拨号、发送短信这类,巧妙地转换成能够和基带处理器顺畅交互的命令。

大模型大数据攻城狮的专栏 1602

Oracle EBS Interface/API(49)- AP付款取消API

Oracle EBS AP付款取消API介绍和简单实例

陈显平的专栏-Oracle EBS 850

Introduction to Data Science in Python 第 3 周 Assignment

Assignment 3 - More Pandas This assignment requires more individual learning then the last one did - you are encouraged to check out the pandas documentation to find functions or methods you might not...

PatrickZheng的博客 2772

文档:亲测可用解决vnc灰屏,黑屏,鼠标大黑叉情况

主要解决vnc-viewer灰屏,黑屏,鼠标大黑叉等现象,详细见文档。

Coursera-Introduction to Data Science in Python-Day 1

Introduction to Data Science - Week 1

grinningGrace的博客 1305

jdk-8u144-linux-x64.tar.gz.

该资源为搭建Linux系统Java环境用,资源的后缀为tar.gz格式的压缩包

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

DataCamp课程:Introduction to Data Science in Python

Introduction to Data Science in Python 1. Getting Started in Python </> Importing Python modules Modules (sometimes called packages or libraries) help group together related sets of tools in Pyt...

Daisy的博客 2万+

Coursera Introduction to Data Science in Python Assignment2

初学python数据分析,以下是Coursera Introduction to Data Science in Python 的编程作业,小白写代码,不够严谨,还请大家一起讨论,共同进步 Part 1 The following code loads the olympics dataset (olympics.csv), which was derrived from th

weixin_39527549的博客 4243

Introduction to Python for Data Science 学习笔记

目录描述1. 简介1.1 Variables and TypesPython 数据类型2. Python 列表2.1 Python List2.2 Subsetting ListsPython列表截取2.3. Manipulating Lists更改列表元素增加或删除列表元素 1. 简介 用于数据科学。 1.1 Variables and Types · 变量名区分大小写; · 通过变量名调用值。...

cc的博客 1195
上一篇: Interactive Employee Management System
下一篇: COMPSCI 316: Cyber Security
wx__codinghelp
博客等级 码龄2年 514粉丝 61原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值