Let us take a look at the following random walk:

Xt=Xt1+N2(0,Σ) with Σ=[1001]

with N2(0,Σ) being a bivariate normal distribution with mean (0,0) and Σ as variance-covariance matrix. Often the identity matrix I is used for the bivariate standard normal distribution.

You can see this as a combination of two independent univariate normal distributions, one on the X axis and one on the Y axis, and both with a mean 0 and a standard deviation of 1.

Write a function randomwalk() that takes an argument n and that calculates the first n steps in a two-dimensional random walk. Return the positions at the different timepoints as a matrix with the columns names x and y. Be sure to include the necessary checks and messages for the user.

There is no need to generate an actual nx2 matrix since Dodona will already do that.