Econ | Winter term 2021/2022 for the course Computational Economics

Winter term 2021/2022 for the course Computational Economics

联系我们: 手动添加方式: 微信>添加朋友>企业微信联系人>13262280223 或者 QQ: 1483266981

Winter term 2021/2022

for the course Computational Economics

Exercise 1: Visualization

a) Create a colored plot with contours of the function f(x,y) Both x- and y-dimension should range from 10 to 10.

b) Prepare a 3D plot of the function f(x,y)

Exercise 2: Dataframes

a) Load the csv fifile persons2.csv into a dataframe.

Insert a column bmi which indicates the body mass index (BMI) of the person which is defifined as bmi

A BMI between 19 and 24 is considered to be normal. Which person does not have a normal BMI

Create a histogram of the BMI with step size one. Choose reasonable scales and labels for x and y-axis.

Exercise 3: Control Flow

a) Write a for-loop that calculates the following sum

Test your loop with n = 10.

b) Write a function that tests if a positive integer n can be written as sum of two squared integers, i. e. Test your function for the integer n = 100.

Exercise 4: Linear Algebra

a) The solution of a linear system

is often rewritten as minimizing a function

We can calculate the gradient to

Write a matrix expression in R to compute F(x) for

Exercise 5: Numerical Analysis

a) Convert the number 243 043 from base 10 into the hexadecmal. State the correspon-ding R code.

b) Visualize the function and its 5th-order Taylor approximation for

Use an x-axis ranging from 5 to 5 and y-axis from 0 to 20.

Exercise 6: Optimality Conditions

a) Verify that is a minimum of the function

State the corresponding R code.

Exercise 7: Optimization

a) Implement the one-dimensional Newton’s method to fifind a local extreme point of a function given a starting point and a tolerance Stop the algorithm, when Complete the following R code.

发表评论

了解 KJESSAY历史案例 的更多信息

立即订阅以继续阅读并访问完整档案。

继续阅读