帮助学生改善学习方法

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 pdimport matplotlib.pyplot as pltimport seaborn as snsimport statsmodels.api as smimport numpy as npimport math#loading the datadata=pd.read_csv("Happiness and how we spend our time (Responses) - Form Responses 1.csv")data.head()

数据清理: (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 dailydata['Exercise']=data['Exercise']/7data['Leisure']=data['Leisure']/7data.head()

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

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

#get the hours variablesdv=datadv=dv.drop(['Year','Gender','Being around others','Happiness score'],axis=1)#sum of rowssumv=dv.sum(axis=1)#making it into percentagesdv['Sleep']=100*dv['Sleep']/sumvdv['Study']=100*dv['Study']/sumvdv['Exercise']=100*dv['Exercise']/sumvdv['Leisure']=100*dv['Leisure']/sumv#replacing the valuesdata['Sleep']=dv['Sleep']data['Study']=dv['Study']data['Exercise']=dv['Exercise']data['Leisure']=dv['Leisure']#looking at datadata.head()

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 sizeplt.rcParams['figure.figsize'] = (8, 6)#plot data desiredd = data.loc[lambda data: data['Being around others'] <= 5]sns.heatmap(d.corr(), cmap = 'Blues', annot = True)plt.show()
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)进行比较。

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%

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%

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 balancedx =  nbal['Sleep']y =  nbal['Happiness score']plt.plot(x, y, 'o')m, b = np.polyfit(x, y, 1)plt.plot(x, m*x + b)
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.taodudu.cc/news/show-995303.html

相关文章:

  • 熊猫数据集_对熊猫数据框使用逻辑比较
  • 决策树之前要不要处理缺失值_不要使用这样的决策树
  • gl3520 gl3510_带有gl gl本机的跨平台地理空间可视化
  • 数据库逻辑删除的sql语句_通过数据库的眼睛查询sql的逻辑流程
  • 数据挖掘流程_数据流挖掘
  • 域嵌套太深_pyspark如何修改嵌套结构域
  • spark的流失计算模型_使用spark对sparkify的流失预测
  • Jupyter Notebook的15个技巧和窍门,可简化您的编码体验
  • bi数据分析师_BI工程师和数据分析师的5个格式塔原则
  • 因果推论第六章
  • 熊猫数据集_处理熊猫数据框中的列表值
  • 数据预处理 泰坦尼克号_了解泰坦尼克号数据集的数据预处理
  • vc6.0 绘制散点图_vc有关散点图的一切
  • 事件映射 消息映射_映射幻影收费站
  • 匿名内部类和匿名类_匿名schanonymous
  • ab实验置信度_为什么您的Ab测试需要置信区间
  • 支撑阻力指标_使用k表示聚类以创建支撑和阻力
  • 均线交易策略的回测 r_使用r创建交易策略并进行回测
  • 初创公司怎么做销售数据分析_初创公司与Faang公司的数据科学
  • 机器学习股票_使用概率机器学习来改善您的股票交易
  • r psm倾向性匹配_南瓜香料指标psm如何规划季节性广告
  • 使用机器学习预测天气_如何使用机器学习预测着陆
  • 数据多重共线性_多重共线性对您的数据科学项目的影响比您所知道的要多
  • 充分利用昂贵的分析
  • 如何识别媒体偏见_描述性语言理解,以识别文本中的潜在偏见
  • 数据不平衡处理_如何处理多类不平衡数据说不可以
  • 糖药病数据集分类_使用optuna和mlflow进行心脏病分类器调整
  • mongdb 群集_群集文档的文本摘要
  • gdal进行遥感影像读写_如何使用遥感影像进行矿物勘探
  • 推荐算法的先验算法的连接_数据挖掘专注于先验算法

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

  1. 上海交通大学出版社python教材答案学生信息管理系统_学生信息管理系统(最终版)...

    <学生信息管理系统.doc>由会员分享,可免费在线阅读全文,更多与<学生信息管理系统(最终版)>相关文档资源请在帮帮文库(www.woc88.com)数亿文档库存里搜索. 1. ...

  2. mysql学生管理系统毕业设计_学生信息管理系统的设计与实现(MyEclipse,MySQL)

    学生信息管理系统的设计与实现(MyEclipse,MySQL)(任务书,开题报告,中期检查表,文献综述,毕业论文15000字,程序代码,MySQL数据库) 学生信息管理系统的开发工具是MyEclips ...

  3. c语言mysql 学生信息管理系统_学生信息管理系统学生时代小作品源码(C语言版)...

    /*****************************************************************************/ /* 制作一个学籍管理系统:要求包含以下 ...

  4. 学生信息系统求助_学生管理信息系统_示例

    第 1 页 共 3 页 学生信息管理数据库系统设计与开发 一 . 项目说明 一.概述 1 .项目背景:数据库程序设计 2 .编写目的:掌握数据库设计原理及相关软件的使用 3 .软件定义:学生信息管理系 ...

  5. JAVA登录界面学生和老师_学生信息管理系统之第三篇登录界面java代码

    class DLFrame extends JFrame implements ActionListener, ItemListener {// 登录界面 JPanel p1 = null; JPan ...

  6. 学生学籍管理系统_学生登陆系统查询与修改信息

    SCx.java package studentManage;import javax.swing.*;import java.awt.*; import java.awt.event.*; impo ...

  7. python学生成绩排序_学生成绩排序基础算法笔记

    刚接触程序语言的时候,经常会用到一些排序的问题,按照算法运行效率和理解上面来看的话,有的时候我们可以记录一些比较便于理解的: 1:如果一个班有5个同学考试成绩如下,需要我们通过程序的方式来对成绩从高到 ...

  8. 教师博客能不能改成学生博客_学生应该博客吗?

    教师博客能不能改成学生博客 这是我的 初级开发人员日记 博客系列中的文章. 我每周都会写更多书,您可以注册以收听更多信息,并阅读 我网站 上的以前文章 . 我最近参加了WelTec的ITP 小组 ,活 ...

  9. 用mysql创建 学生选课 数据库_学生选课系统数据库SQL语句考试题

    --1. 查询Student表中的所有记录的Sname.Ssex和Class列. SELECT sname,Ssex,class from Student --2. 查询教师所有的单位即不重复的Dep ...

最新文章

  1. 构建深度学习框架运行平台
  2. hbase 修改表名_HBase学习——2.HBase原理
  3. 正則表達式基本元字符集及其含义(上)
  4. Python3之多线程学习
  5. java中printarray和selectsort方法_算法题(一)
  6. TypeScript里一些特殊的类型
  7. java 协议处理器_协议处理器urlstreamhandler及contenthandler
  8. 学习API 判断光驱是否为光盘
  9. 设置熄屏_自定义熄屏显示其实很简单
  10. 计算机三维技术在影视广告设计中应用的研究 罗晋,计算机三维技术在影视广告设计中应用的研究...
  11. 海康威视 摄像头 RTMP 转 FLV
  12. vs2010使用教程c语言编程,VS2010的使用
  13. Eviews做ARIMA模型
  14. 解决华硕笔记本自带触摸板的二指及三指失效的问题
  15. 前Sun高级经理蒋清野:从JavaEye社区被迫改名说起
  16. 水调歌头.明月几时有 小儿拼音版
  17. webservice 缺少根元素_草莓种植,钙、硼元素十分重要,直接关系到草莓的产量和品质!...
  18. spark学习小象学院陈超
  19. 【html】css字体样式
  20. 一.微信小程序一些接口的使用

热门文章

  1. C++派生类对象和基类对象赋值
  2. C++总结8——shared_ptr和weak_ptr智能指针
  3. leetcode(283)移动零
  4. 程序员深度学习!我想谈谈关于Android面试那些事,附赠课程+题库
  5. apply()与call()
  6. LeetCode 105. Construct Binary Tree from Preorder and Inorder Traversal 由前序和中序遍历建立二叉树 C++...
  7. Object.prototype 原型和原型链
  8. Day 3 网络基础
  9. [luoguP2801] 教主的魔法(二分 + 分块)
  10. 汉王云名片识别(SM)组件开发详解