I am having a hard time understanding this problem I have tried several times and have got the wrong answer. the question is: consider data with…