2. Make a data frame consisting of 20 and 10 columns. Each column j should consist...

80.2K

Verified Solution

Question

Basic Math

2. Make a data frame consisting of 20 and 10 columns. Eachcolumn j should consist of 20 values from a normal distributionwith mean (i-1) and standard deviation 0.5j. For example, the thirdcolumn should be normal(mean=2, sd=1.5). Using this data frame, doeach of the following (using code, of course):
a. Find the mean and standard deviation for each column.
b. Write code that counts the number of columns for which thesample mean and sample standard deviation are within 20% of thevalues used to generate the data.
c. Write code that writes the columns from part b to a new dataframe.
d. For each value in the new data frame, subtract its column meanand divide by the column standard deviation.

Solution using r and python

Answer & Explanation Solved by verified expert
4.1 Ratings (746 Votes)
Solution using r Create matrix of order 20 by 10 Mmatrixrep02010nrow20ncol10 forj in 110    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students