帮助学生改善学习方法_学生应该如何花费时间改善自己的幸福

帮助学生改善学习方法

There have been numerous studies looking into the relationship between sleep, exercise, leisure, studying and happiness. The results were often quite like how we expected, though there have been debates about the relationship between sleep and happiness. However, I was wondering if we could put it in the perspective of how we spend our time in general and seeing whether a balance of time spent in different aspects of our lives would influence our happiness levels.

有许多研究探讨睡眠,运动,休闲,学习和幸福之间的关系。 尽管对于睡眠与幸福之间的关系一直存在争论,但结果通常与我们的预期非常相似。 但是,我想知道我们是否可以从总体上如何度过时光的角度来看待,看看在生活的各个方面度过的时间平衡是否会影响我们的幸福感。

Rather than chasing after more sleep, or more exercise, how should we be spending our time across the board to increase our happiness?

与其追逐更多的睡眠或更多的运动,不如我们应该花很多时间来增加幸福感?

As a university student in Singapore, I decided to do a simple survey of my peers.

作为新加坡的一名大学生,我决定对同龄人进行简单调查。

资料说明: (Data description:)

Number of responses=45

回应数 = 45

Variables, keeping in mind that I am asking university students: — year of studies — gender — level of comfort around people (account for possible personality differences) — satisfaction (a good measure for happiness as it tends to be stable) — sleep hours (per day) — study hours (per day) — exercise hours (per week) — leisure hours (per week)

变量 ,请记住,我要问的是大学生:-学习年限-性别-人们周围的舒适度(考虑可能的人格差异)-满意度(幸福感的一种稳定的衡量标准,因为它趋于稳定)-睡眠时间每天)-学习时间(每天)-运动时间(每周)-闲暇时间(每周)

Next, I’ll be using Python through Jupyter Notebook to do some data cleaning. Starting with importing of the necessary packages and looking at the data.

接下来,我将通过Jupyter Notebook使用Python进行一些数据清理。 从导入必要的程序包开始,然后查看数据。

import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import statsmodels.api as sm
import numpy as np
import math#loading the data
data=pd.read_csv("Happiness and how we spend our time (Responses) - Form Responses 1.csv")
data.head()
Image for post

数据清理: (Data cleaning:)

1) Renaming the column header for simplicity

1)重命名列标题以简化操作

data.columns=['Year','Gender','Being around others','Happiness score','Sleep','Study','Exercise','Leisure']

2) Converting from categorical to numerical by:

2)通过以下方式从分类转换为数值:

  • taking the mean of the range of values, with a constant interval between each option (Note: get respondents to enter integers instead next time).

    取值范围的平均值,每个选项之间的间隔是固定的(注意:下次让受访者输入整数)。
  • replacing ‘Male’ and ‘Female’ with 1 and 0 and ‘year 1’ to ‘year 5’ to just ‘1’ to ‘5’.

    用1和0替换“男”和“女”,将“ 1年”到“ 5年”替换为“ 1”到“ 5”。
data=data.replace({'Year 5':5, 'Year 4':4,'Year 3':3,'Year 2':2,'Year 1':1,'Male':0,'Female':1,'0 to 1 hour':0.5,'0 to 2 hours':1,'1 to 2 hours':1.5,'3 to 4 hours':3.5,'4 to 5 hours':4.5,'5 to 6 hours':5.5,'7 to 8 hours':7.5,'0 to 4 hours':2,'5 to 9 hours':7,'9 to 10 hours':9.5,'10 to 14 hours':12,'15 to 19 hours':17,'20 to 24 hours':22,'25 to 29 hours':27,'9 or more hours a week':9.5,'More than 30 hours a week':32})

3) drop the ‘Timestamp’ column and dividing ‘exercise’ and ‘leisure’ values by 7 to get a daily value

3)删除“时间戳”列,并将“运动”和“休闲”值除以7,以获取每日值

data=data.drop('Timestamp',axis=1)#make weekly hours to daily
data['Exercise']=data['Exercise']/7
data['Leisure']=data['Leisure']/7
data.head()

4) Converting sleep, study, exercise and leisure to percentages.

4)将睡眠,学习,运动和休闲转化为百分比。

#get the hours variables
dv=data
dv=dv.drop(['Year','Gender','Being around others','Happiness score'],axis=1)#sum of rows
sumv=dv.sum(axis=1)#making it into percentages
dv['Sleep']=100*dv['Sleep']/sumv
dv['Study']=100*dv['Study']/sumv
dv['Exercise']=100*dv['Exercise']/sumv
dv['Leisure']=100*dv['Leisure']/sumv#replacing the values
data['Sleep']=dv['Sleep']
data['Study']=dv['Study']
data['Exercise']=dv['Exercise']
data['Leisure']=dv['Leisure']#looking at data
data.head()
Image for post

Now that we have the data in the form that we’d like, we can start to create data visualizations. I’ve decided to focus on personality, % of hours (sleep, study, exercise and leisure) and the happiness score.

现在我们已经有了所需形式的数据,我们可以开始创建数据可视化了。 我决定专注于性格,工作时间百分比(睡眠,学习,锻炼和休闲)和幸福感分数。

分析: (Analysis:)

Personality and happiness:

个性与幸福:

The following is the correlation heat map for those who rated themselves as being less comfortable around others (‘Being around others’<=5).

以下是针对那些自称在其他人周围不舒服(“在其他人周围” <= 5)的人的相关性热点图。

#set size
plt.rcParams['figure.figsize'] = (8, 6)#plot data desired
d = data.loc[lambda data: data['Being around others'] <= 5]
sns.heatmap(d.corr(), cmap = 'Blues', annot = True)
plt.show()
Image for post
Correlation heat map for “Being around others” ≤ 5
“与他人在一起”的相关热图≤5

Mean for sleep=42.11%, mean for leisure=13.98%, mean happiness score=4.92. Notice that the correlation between happiness and sleep was the highest at 0.52, correlation between happiness and leisure was -0.37.

睡眠平均值= 42.11%,休闲平均值= 13.98%,幸福分数= 4.92。 注意,幸福与睡眠之间的相关性最高,为0.52 ,幸福与休闲之间的相关性为-0.37。

Compare this to those who rated themselves as being more comfortable around others (‘Being around others’>5).

将此与那些认为自己在他人周围更自在的人(“在他人周围”> 5)进行比较。

Image for post
Correlation heat map for “Being around others” > 5
“与他人在一起”的相关热图> 5

Mean for sleep=45.64%, mean for leisure=15.21%, mean happiness score=6.81. The correlation between happiness and sleep was the highest at 0.24, correlation between happiness and leisure was -0.0028.

睡眠平均值= 45.64%,休闲平均值= 15.21%,幸福分数= 6.81。 幸福与睡眠的相关性最高,为0.24,幸福与休闲的相关性为-0.0028

Every other correlation was surprisingly negative! Although I expected sleep to have a high correlation with happiness as people may prefer to be alone, activities like leisure having a negative correlation with happiness is quite unexpected. This seems to suggest that for people who are less comfortable around others are more likely to be influenced by the amount of time they spend sleeping, while the other factors do not seem to be an important factor that influences their happiness. At the same time, spending more time on leisure appears to have a negative correlation with their happiness, though this may not be as prominent in people who rated themselves as being more comfortable with others.

其他所有相关性都令人惊讶地为负! 尽管我期望人们可能更喜欢一个人,但睡眠与幸福具有高度相关性,但休闲等活动与幸福具有负相关性却是出乎意料的。 这似乎表明,对于那些与他人较不舒服的人,他们更可能会受到睡眠时间的影响,而其他因素似乎并不是影响他们幸福感的重要因素。 同时,花更多的时间在休闲上似乎与他们的幸福感呈负相关,尽管这在那些认为自己与他人更舒适的人中并不那么突出。

If we take a look at the mean value for exercise and leisure, it appears that more time spent on sleeping might be beneficial to those who are less comfortable around others. Perhaps a further dissection and examination on personality might grant further insights into what makes us happy. Nonetheless, it appears that perhaps happiness and personality seems to have some correlation.

如果我们看一下运动和休闲的平均值,那么似乎更多的时间在睡眠上可能对那些不太舒服的人有益。 也许对人格的进一步剖析和考察可能会给我们带来什么使我们快乐的更多见解。 然而,似乎幸福和个性似乎之间存在某种关联。

Sleep is a more important factor in those who are less comfortable around others compared to their counterparts.

对于那些与他人相比不那么舒服的人,睡眠是一个更重要的因素。

Balanced hours and happiness:

平衡的时间和幸福:

Next, let’s look at how spending different proportion of our time correlates with happiness scores.Balanced: all components <50%

接下来,让我们看看度过不同时间的时间与幸福感分数如何相关。 平衡:所有组件<50%

Image for post
Correlation heat map for balanced hours
平衡时间的相关热图

Happiness score: mean=6.80, sd=2.00. Correlation between being around others and happiness =0.44.

幸福评分: 平均值= 6.80,标准偏差= 2.00 。 周围人与幸福之间的相关性= 0.44

Unbalanced: any component ≥ 50%

不平衡:任何成分≥50%

Image for post

Happiness score: mean=5.60, sd=2.80. Correlation between sleep and happiness=0.7, correlation between study and happiness=-0.4. *those who entered the unbalanced group were due to study or sleep ≥ 50%

幸福评分: 平均值= 5.60,标准偏差= 2.80。 睡眠与幸福之间的相关性= 0.7 ,学习与幸福之间的相关性= -0.4。 *进入失衡组的人是由于学习或睡眠≥50%

Looking at the mean, it appears that ensuring that we have a balanced distribution of hours across the 4 factors correlates with higher levels of happiness. However, let’s take a look at the regression line for happiness and sleep for unbalanced hours with correlation of 0.7!

从均值来看,似乎可以确保我们在这四个因素上的小时数均衡分配与更高水平的幸福感相关。 但是,让我们看一下相关系数为0.7的幸福感和不平衡时间睡眠的回归线!

#nbal is the data with only rows that are not balanced
x = nbal['Sleep']
y = nbal['Happiness score']
plt.plot(x, y, 'o')
m, b = np.polyfit(x, y, 1)
plt.plot(x, m*x + b)
Image for post
Regression line for happiness and sleep (unbalanced hours)
幸福和睡眠的回归线(时间不平衡)

If i look at only data of those with ‘Sleep’ ≥ 50% of hours:Happiness mean=7.17, sd=1.22Maybe we all just need a higher % of time for sleep. When I relaxed the criteria to ≥ 40%, the mean happiness score fell to 6.49. Furthermore, it appears that it’s spending >50% of our time on studying that brought down the mean (mean of those with ≥ 50% studying hours = 3.4285, sd=2.88).

如果我仅查看“睡眠”≥50%的那些人的数据:幸福平均= 7.17,sd = 1.22也许我们所有人都只需要更长的时间才能入睡。 当我将标准放宽到≥40%时,平均幸福感得分降至6.49。 此外,似乎花费了我们超过50%的时间在学习上降低了平均值(学习时间≥50%的人的平均值= 3.4285,sd = 2.88)。

Those with ≥50% of hours spent on sleep across ‘Sleep’, ‘Study’, ‘Exercise’, ‘Leisure’ had a happiness mean score of 7.17.

那些在“睡眠”,“学习”,“锻炼”,“休闲”中花费≥50%的睡眠时间的人的幸福平均得分为7.17。

结论: (Conclusion:)

If you read all of the above, thank you so much because I spent a lot of time trying to code and getting the values I needed for analysis! Otherwise, here’s a quick summary:Question that I wanted to answer: Does the proportion of time spent on different activities influence our happiness levels?

如果您阅读了以上所有内容,则非常感谢,因为我花了很多时间尝试编码并获取分析所需的值! 否则,这里是一个简短的摘要: 我想回答的问题:花在不同活动上的时间比例会影响我们的幸福感吗?

Yes, it does! Students with a more balanced proportion of hours spent across activities appear to have a positive correlation with happiness levels.

是的,它确实! 学生在各项活动中花费的时间比例更均衡的情况似乎与幸福感水平呈正相关。

Findings:

发现:

1) Positive correlation between sleep and happiness throughout 2) Personality has an influence on the types of activities that correlates with our happiness (e.g sleep and leisure) 3) Those who have a more balanced spread of hours seem to be happier than those who had unbalanced hours 4) Those with ≥50% of their time, across the variables, spent on sleeping had higher mean score for happiness 5) Those with ≥50% of their time, across the variables, spent on studying had lower mean score for happiness.

1)整个过程中睡眠与幸福之间呈正相关 2) 人格对与我们的幸福相关的活动类型有影响(例如睡眠和休闲)3)时间分布更均衡的人似乎比那些快乐的人更快乐时间不平衡4)在变量中≥50%的时间花费在睡眠上的人的平均幸福分数较高 5)在变量中≥50%的时间花费在学习上的的幸福平均分数较低

Rather than chasing after more sleep, or more exercise, how should we be spending our time across the board to increase our happiness?

与其追逐更多的睡眠或更多的运动,不如我们应该花很多时间来增加幸福感?

  • Spend more % of our time sleeping. Sounds simple yet difficult in a competitive/work-centric environment.

    花更多的时间睡觉。 在竞争/以工作为中心的环境中听起来很简单却很困难。
  • Alternatively, try to balance the number of hours we spent in different activities (do not spend too much time on a single activity!)

    或者,尝试平衡我们在不同活动上花费的时间(不要在单个活动上花费太多时间!)

Nonetheless, glad to have learnt a lot of python and data visualization from this mini-project and trying to milk all the information that it’s trying to tell me! Do let me know if there are other areas I could look at or your thoughts on the results! Would try to get a larger data set the next time.

但是,很高兴从这个小型项目中学到了很多python和数据可视化,并尝试提取所有试图告诉我的信息! 请让我知道我是否还有其他需要关注的方面或您对结果的看法! 下次将尝试获取更大的数据集。

翻译自: https://towardsdatascience.com/how-should-students-spend-their-time-to-improve-their-happiness-a8bab76fb3c4

帮助学生改善学习方法

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/389638.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Spring Boot 静态资源访问原理解析

一、前言 springboot配置静态资源方式是多种多样&#xff0c;接下来我会介绍其中几种方式&#xff0c;并解析一下其中的原理。 二、使用properties属性进行配置 应该说 spring.mvc.static-path-pattern 和 spring.resources.static-locations这两属性是成对使用的&#xff0c;如…

深挖“窄带高清”的实现原理

过去几年&#xff0c;又拍云一直在点播、直播等视频应用方面潜心钻研&#xff0c;取得了不俗的成果。我们结合点播、直播、短视频等业务中的用户场景&#xff0c;推出了“省带宽、压成本”系列文章&#xff0c;从编码技术、网络架构等角度出发&#xff0c;结合又拍云的产品成果…

Redis 服务安装

下载 客户端可视化工具: RedisDesktopManager redis官网下载: http://redis.io/download windos服务安装 windows服务安装/卸载下载文件并解压使用 管理员身份 运行命令行并且切换到解压目录执行 redis-service --service-install windowsR 打开运行窗口, 输入 services.msc 查…

熊猫数据集_对熊猫数据框使用逻辑比较

熊猫数据集P (tPYTHON) Logical comparisons are used everywhere.逻辑比较随处可见 。 The Pandas library gives you a lot of different ways that you can compare a DataFrame or Series to other Pandas objects, lists, scalar values, and more. The traditional comp…

决策树之前要不要处理缺失值_不要使用这样的决策树

决策树之前要不要处理缺失值As one of the most popular classic machine learning algorithm, the Decision Tree is much more intuitive than the others for its explainability. In one of my previous article, I have introduced the basic idea and mechanism of a Dec…

gl3520 gl3510_带有gl gl本机的跨平台地理空间可视化

gl3520 gl3510Editor’s note: Today’s post is by Ib Green, CTO, and Ilija Puaca, Founding Engineer, both at Unfolded, an “open core” company that builds products and services on the open source deck.gl / vis.gl technology stack, and is also a major contr…

uiautomator +python 安卓UI自动化尝试

使用方法基本说明&#xff1a;https://www.cnblogs.com/mliangchen/p/5114149.html&#xff0c;https://blog.csdn.net/Eugene_3972/article/details/76629066 环境准备&#xff1a;https://www.cnblogs.com/keeptheminutes/p/7083816.html 简单实例 1.自动化安装与卸载 &#…

power bi中的切片器_在Power Bi中显示选定的切片器

power bi中的切片器Just recently, while presenting my session: “Magnificent 7 — Simple tricks to boost your Power BI Development” at the New Stars of Data conference, one of the questions I’ve received was:就在最近&#xff0c;在“新数据之星”会议上介绍我…

5939. 半径为 k 的子数组平均值

5939. 半径为 k 的子数组平均值 给你一个下标从 0 开始的数组 nums &#xff0c;数组中有 n 个整数&#xff0c;另给你一个整数 k 。 半径为 k 的子数组平均值 是指&#xff1a;nums 中一个以下标 i 为 中心 且 半径 为 k 的子数组中所有元素的平均值&#xff0c;即下标在 i …

数据库逻辑删除的sql语句_通过数据库的眼睛查询sql的逻辑流程

数据库逻辑删除的sql语句Structured Query Language (SQL) is famously known as the romance language of data. Even thinking of extracting the single correct answer from terabytes of relational data seems a little overwhelming. So understanding the logical flow…

数据挖掘流程_数据流挖掘

数据挖掘流程1-简介 (1- Introduction) The fact that the pace of technological change is at its peak, Silicon Valley is also introducing new challenges that need to be tackled via new and efficient ways. Continuous research is being carried out to improve th…

北门外的小吃街才是我的大学食堂

学校北门外的那些小吃摊&#xff0c;陪我度过了漫长的大学四年。 细数下来&#xff0c;我最怀念的是…… &#xff08;1&#xff09;烤鸡翅 吸引指数&#xff1a;★★★★★ 必杀技&#xff1a;酥流油 烤鸡翅有蜂蜜味、香辣味、孜然味……最爱店家独创的秘制鸡翅。鸡翅的外皮被…

[LeetCode]最长公共前缀(Longest Common Prefix)

题目描述 编写一个函数来查找字符串数组中的最长公共前缀。如果不存在公共前缀&#xff0c;返回空字符串 ""。 示例 1:输入: ["flower","flow","flight"]输出: "fl"示例 2:输入: ["dog","racecar",&quo…

spark的流失计算模型_使用spark对sparkify的流失预测

spark的流失计算模型Churn prediction, namely predicting clients who might want to turn down the service, is one of the most common business applications of machine learning. It is especially important for those companies providing streaming services. In thi…

区块链开发公司谈区块链与大数据的关系

在过去的两千多年的时间长河中&#xff0c;数字一直指引着我们去探索很多未知的科学世界。到目前为止&#xff0c;随着网络和信息技术的发展&#xff0c;一切与人类活动相关的活动&#xff0c;都直接或者间接的连入了互联网之中&#xff0c;一个全新的数字化的世界展现在我们的…

Jupyter Notebook的15个技巧和窍门,可简化您的编码体验

Jupyter Notebook is a browser bases REPL (read eval print loop) built on IPython and other open-source libraries, it allows us to run interactive python code on the browser.Jupyter Notebook是基于IPL和其他开源库构建的基于REPL(读取评估打印循环)的浏览器&#…

bi数据分析师_BI工程师和数据分析师的5个格式塔原则

bi数据分析师Image by Author图片作者 将美丽融入数据 (Putting the Beauty in Data) Have you ever been ravished by Vizzes on Tableau Public that look like only magic could be in play to display so much data in such a pleasing way?您是否曾经被Tableau Public上的…

BSOJ 2423 -- 【PA2014】Final Zarowki

Description 有n个房间和n盏灯&#xff0c;你需要在每个房间里放入一盏灯。每盏灯都有一定功率&#xff0c;每间房间都需要不少于一定功率的灯泡才可以完全照亮。 你可以去附近的商店换新灯泡&#xff0c;商店里所有正整数功率的灯泡都有售。但由于背包空间有限&#xff0c;你…

WPF绑定资源文件错误(error in binding resource string with a view in wpf)

报错&#xff1a;无法将“***Properties.Resources.***”StaticExtension 值解析为枚举、静态字段或静态属性 解决办法&#xff1a;尝试右键单击在Visual Studio解决方案资源管理器的资源文件&#xff0c;并选择属性选项&#xff0c;然后设置自定义工具属性 PublicResXFile cod…

因果推论第六章

因果推论 (Causal Inference) This is the sixth post on the series we work our way through “Causal Inference In Statistics” a nice Primer co-authored by Judea Pearl himself.这是本系列的第六篇文章&#xff0c;我们将通过Judea Pearl本人与他人合着的《引诱统计学…