Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

This problem will use R to nd all possible orderings of 7 objects, and probabilities associated with them. Consider your vector of possible values...

I know how to do part(a), but I don't know how to use sapply function at part (b). Can you give me some hints?

III. This problem will use R to find all possible orderings of 7 objects, and probabilities associated with them. Consideryour vector of possible values to be:values = as.character(1 :7) (a) Use the function sample to draw from values 7 times (without replacement), and return this vector. Notice it is avector, with 7 values. Display your particular draw. (b) Repeat (a) 100000 times using an sapply. Notice the result has 7 rows, and 100000 columns, where each column isa specific random draw. Use this result to find how many of your orderings begin with the character 1. (c) Use your samples from (b) to find the probability that a random ordering started with a 3 and ended with a 7. (d) The function paste can collapse a vector of many characters into a single character with the following command:one.order = pasteCone.draw,collapse = "")Modify the above and use it with an sapply to find how many unique orderings of 7 values there are (assumingorder matters and no repetitions are allowed).
Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question