Question: could you help me understand why this is still being graded wrong. here's the question my answer and the autograded response. Part B ) We

could you help me understand why this is still being graded wrong. here's the question my answer and the autograded response. Part B)
We have a theoretical understanding of what hat(p) should be, but let's she what that value is when we have actual data.
The cell below loads 10 samples of this random variable. In other words, we opened 10 boxes of chocolates, and recorded the number of chocolates we
had to eat before we found an unfilled chocolate. We only have 10, because we needed a break from the chocolate at that point. Using that data, calculate
hat(p) of your sample. Save your
solution as p
p.hat = NA
# your code here
num.success - length(trials[trials ==0])
total.trials - length(trials)
p.hat - num.success/total.trials
# Print p-hat
p.hat
0.3
One or more test cases in this cell did not pass.
Instructor hints:
1. "Checking sample calculations". hat.
 could you help me understand why this is still being graded

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!