Question: Currently struggling on a lecture problem, we are coding in R, explain throughly if possible, thank you! Define the following piecewise function f, If x
Currently struggling on a lecture problem, we are coding in R, explain throughly if possible, thank you!

Define the following piecewise function f, If x is a real number we set, f(x) =2x if x > otherwise we set f(x ) =1-x. Now generate a random vector in (0,1) of length 1909 using set.seed(1). Apply the function / to each coordinate of the vector. What is the average of all the numbers
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
