跳至主要內容
02-R 语言编程

1. 决策

1.1 if 条件语句

在许多情况下,你需要根据条件做出决定。

为此,可以使用 if 语句。

例如:

x <- 24
if(x > 10){
    print( "x is greater than 10")
}

AI悦创原创...大约 24 分钟1v1R 语言一对一辅导数据分析一对一辅导数据分析一对一教学留学生辅导R留学生作业辅导1v1R 语言一对一辅导数据分析一对一辅导数据分析一对一教学留学生辅导R留学生作业辅导
01-R 语言介绍

1. 欢迎来到 R 语言

你好,我是悦创。

R 语言是应用最广泛的统计编程语言。

而且 R 语言它是数据科学家和分析师的首选。

在本课程中,我们将学习R语言的基础知识,了解如何创建存储和操作数据的程序、以及如何使用各种数据集执行数据分析任务,以及如何使用图形和图表可视化结果。

本课程学习的技能可应用于任何与数据相关的领域,包括金融数据科学机器学习等。


AI悦创原创...大约 13 分钟1v1R 语言一对一辅导数据分析一对一辅导数据分析一对一教学留学生辅导R留学生作业辅导1v1R 语言一对一辅导数据分析一对一辅导数据分析一对一教学留学生辅导R留学生作业辅导
Assignment 1 Grades Generator

Assignment 1 is designed to test your understanding of the skills practiced in weeks 1 through 4:

  • creating variables using Python's built-in data types
  • converting and checking data types
  • using built-in functions
  • using conditional statements and loops
  • writing functions

AI悦创原创...大约 3 分钟1v1python 1v1数据结构一对一留学生辅导留学生作业辅导加州大学美国1v1python 1v1数据结构一对一留学生辅导留学生作业辅导加州大学美国
7.6.1 Basic Data Structures Quiz

Question: 1

What kind of data structure is user_data in the following declaration?

user_data = ("TJ", 24, "artLover123")

AI悦创原创...大约 3 分钟1v1java 1v1高中生Python辅导web 一对一数据结构一对一留学生辅导creanlutheran.org留学生作业辅导1v1java 1v1高中生Python辅导web 一对一数据结构一对一留学生辅导creanlutheran.org留学生作业辅导
How to Complete the Homeworks.pdf

AI悦创原创...大约 1 分钟1v1python 1v1数据结构一对一留学生辅导留学生作业辅导哥伦比亚大学1v1python 1v1数据结构一对一留学生辅导留学生作业辅导哥伦比亚大学
Observe Proper Netiquette

Netiquette is essentially rules and norms for interacting with others on the Internet.

We’re here to help with nine simple guidelines for how to be on your best behavior in an online classroom.

Nine netiquette guidelines every online student needs to know.

1. NO YELLING, PLEASE


AI悦创原创...大约 4 分钟1v1python 1v1数据结构一对一留学生辅导留学生作业辅导哥伦比亚大学1v1python 1v1数据结构一对一留学生辅导留学生作业辅导哥伦比亚大学
Computer Systems Organization CSCI-UA.0201 Fall 2023

AI悦创原创...大约 7 分钟1v1java 1v1纽约大学一对一NYU 1v1web 一对一数据结构一对一留学生辅导php留学生作业辅导1v1java 1v1php纽约大学一对一NYU 1v1web 一对一留学生辅导留学生作业辅导
Econometric Python Lab Assignment 1

1. 题目

  1. (0 points) Please type your code and answers into Jupyter notebook. All visualizations should be prop-erly labelled. Submit the notebook as a pdf.

  2. (3.5 points) Use the bwght dataset from the Wooldridge python module to answer the following question. You can find the documentation for the data online here. Import this data into your notebook.

    (a) (1.5 Points) How many women are in the sample? What proportion of women with a family income higher than $50,000 are smokers? What proportion of women with a family income less than $20,000 are smokers?

    (b) (1 Points) Generate a table of summary statistics for the dataframe. What is the average number of cigarettes smoked in a day? Is the mean a good measure of the typical women’s smoking habits? If no, explain why and if there is a better measure.

    (c) (1 Points) Find the mode of fatheduc in the sample. Why are only 1,192 observations used to compute this statistic?

  3. (5.5 points) Use the bwght dataset from the Wooldridge python module to answer the following question.

    (a) (1 point) Generate two different histograms of bwght using Sturge’s and FD binning methods. Explain the strengths and weaknesses of each method when applied to bwght.

    (b) (1 point) Create a histogram of bwght using either sturges or fd to choose the number of bins. Overlay a density curve.

    (c) (2 points) Using a q-q plot, do you believe bwght is approximately normally distributed? Why are why not? What about family income?

    (d) (1.5 points) Create a boxplot conditioning on whether or not the mother was a smoker. Do you observe any differences? If so, what are they?

  4. (6 points) Use the bwght dataset from the Wooldridge python module to answer the following question.

    (a) (2 points) Estimate the parameters for the following simple regression:

    bwght^=β0^+β1^×packs \large \hat{bwght} = \hat{\beta_0} + \hat{\beta_1} \times packs

    report the intercept and slope. What do these tell you about the association between cigarette use and birth weight?

    (b) (2 points) What is the predicted value of birthweight when packs = 0? When packs = 2? What is the interpretation of the intercept?

    (c) (1 point) Verify the residuals of this regression sum (approximately) to zero.

    (d) (1 point) Using a scatter plot, show the observed values against the values predicted by a regression.


AI悦创原创...大约 3 分钟1v1python 1v1数据结构一对一留学生辅导留学生作业辅导加州大学美国1v1python 1v1数据结构一对一留学生辅导留学生作业辅导加州大学美国
03-spreadsheet

AI悦创原创...大约 13 分钟1v1java 1v1纽约大学一对一NYU 1v1web 一对一数据结构一对一留学生辅导php留学生作业辅导1v1java 1v1php纽约大学一对一NYU 1v1
Problem 1

Q1

Q2

Q3

Create a list of your favorite 4 movies. Print out the 0th element in the list. Now set the 0th element to be “Star Wars” and try printing it out again.

创建你最喜欢的4部电影的列表。打印列表中的第0个元素。现在将第0个元素设置为“星球大战”,然后再试着打印它。

# 创建一个包含4部电影的列表
favorite_movies = ["Movie1", "Movie2", "Movie3", "Movie4"]

# 打印列表中的第0个元素
print(favorite_movies[0])

# 将第0个元素设置为“星球大战”
favorite_movies[0] = "星球大战"

# 再次打印列表中的第0个元素
print(favorite_movies[0])

AI悦创原创...大约 11 分钟1v1java 1v1高中生Python辅导web 一对一数据结构一对一留学生辅导creanlutheran.org留学生作业辅导1v1java 1v1高中生Python辅导web 一对一数据结构一对一留学生辅导creanlutheran.org留学生作业辅导
Go to canvas and download titanic.csv

Notebook

使用命令行运行 Jupyter Notebook 的具体流程如下:

  1. 思考🤔:你想在哪里运行你的项目 or 你想把代码存储在哪里?「确定路径」
  2. 启动 CMD:在文件夹上面的路径中,直接输入 cmd 回车「Enter」目标🎯:为了更快速的到达目标路径。(还有多种方法,以后再讲)
  3. 确保安装了 Jupyter Notebook:
jupyter notebook

AI悦创原创...大约 21 分钟1v1python 1v1MA407伦敦政经LSE Home数据结构一对一留学生辅导留学生作业辅导1v1python 1v1MA407伦敦政经LSE Home数据结构一对一留学生辅导留学生作业辅导
待补充

1. 待解决问题🙋

公众号:AI悦创【二维码】

AI悦创原创...大约 1 分钟1v1python 1v1MA407伦敦政经LSE Home数据结构一对一留学生辅导留学生作业辅导1v1python 1v1MA407伦敦政经LSE Home数据结构一对一留学生辅导留学生作业辅导
5.10.1 Functions and Parameters Quiz

Question: 1

In the following code:「D」

size = 20
x = 100
y = 200
ball = Circle(size)
circle.set_position(x, y)

AI悦创原创...大约 6 分钟1v1java 1v1高中生Python辅导web 一对一数据结构一对一留学生辅导creanlutheran.org留学生作业辅导1v1java 1v1高中生Python辅导web 一对一数据结构一对一留学生辅导creanlutheran.org留学生作业辅导
Quiz

Question 1

Write a function that takes one parameter - a float which represents a temperature in Celsius - and returns a float which represents that temperature in Fahrenheit.

Then, write a function that does the opposite conversion.

Here are the formulas for temperature conversion:


AI悦创原创...大约 6 分钟1v1java 1v1高中生Python辅导web 一对一数据结构一对一留学生辅导creanlutheran.org留学生作业辅导1v1java 1v1高中生Python辅导web 一对一数据结构一对一留学生辅导creanlutheran.org留学生作业辅导
Quiz

AI悦创原创...大约 4 分钟1v1java 1v1纽约大学一对一NYU 1v1web 一对一数据结构一对一留学生辅导php留学生作业辅导1v1java 1v1php纽约大学一对一NYU 1v1web 一对一留学生辅导留学生作业辅导
Raw Data Munging

AI悦创原创...大约 11 分钟1v1java 1v1纽约大学一对一NYU 1v1web 一对一数据结构一对一留学生辅导php留学生作业辅导1v1java 1v1php纽约大学一对一NYU 1v1web 一对一留学生辅导留学生作业辅导