1. Engineering
  2. Computer Science
  3. 3 14 points let x be a time series of...

Question: 3 14 points let x be a time series of...

Question details

3. 14 points) Let X be a time series of Os and 1s indicating the outcome of each trial 0 is failure, 1 is success). Write a function relative. freqCarr) where the input arr is a 1-d array of Os and 1s. The function returns a 1-d array of the same size, of which each element is the relative frequency of success at the current time point.For example, x 0,0,1,0,0,1,1,0,0,1] shows the result of 10 trials at time points 1,2,3,.. .0. The function will find the relative frequency of success at each time point, i.e.p-10/1,0/2,1/3,1/4,1/5,2/6,3/7.3/8,3/9,4/10)] Hint: use cumsum) 10 A4 29 2 MarRook Air
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution