# Linear regression. Find the estimated parameter through Using 1000 data sets each contains 100 data. get average and standard deviation and density plot. Repeat to use bootstrapping method and compare the results under two different method.

I need support with this Python question so I can learn better.

Linear regression. Find the estimated parameter through Using 1000 data sets each contains 100 data. get average and standard deviation and density plot. Repeat to use bootstrapping method and compare the results under two different method.

Please use the formula (xTx)^(-1)xTy to calculate the beta, where x and y are matrix and T is the transpose.

Please imitate the code in the txt file.

To generate the 1000 data sets with 100 data in each data set, we need a 1000 by 100 matrix.

Please note the difference between bootstrap method and the generation of 1000 data sets method.

As there are 1000 data sets, by generating each data set using random generator, the final estimated beta_0 and beta_1 should be close to 1 and 2 respectively.

For the bootstrapping part, the final answer is close to 1 and 2 but not as precise as the previous method.

Please read the pdf file called bootstrap.