R Programming for Biology - IT Assignment Help

Download Solution Order New Solution
Asignment Task

 

Information

• Rationale: One of the important objectives of this course is to make you capable of carrying computational tasks using code that you have written. This involves both coming up with a method for completing the task and implementing this method in R. This assignment will require you to apply material covered in Units 2 and 3 to different contexts.

 

Question 1 - A standard deck of playing cards consists of 52 cards. These are divided into four suits (clubs, diamonds, hearts and spades). Clubs and spades are black in colour, whereas the other two suits are red. Each suit has 13 ranks (A, 2, 3, 4, 5, 6, 7, 8, 9, 10, J, Q, K). J, Q and K are known as face cards. Use repeated simulation in R to answer parts a and b.

a. What is the probability that there is a face card among the top 11 cards in a well-shuffled deck?

b. What is the probability that at least two face cards are positioned next to each other in a well-shuffled deck?

Question 2 - a. Let n be a randomly chosen positive integer between 1 and Nmax (1 ≤ n ≤ Nmax). Write a function that takes Nmax as an input argument and returns the probability that the sum of digits of n (the randomly chosen integer) is strictly less than 5. Clarification: If n = 23, then the sum of digits of n is equal to 2 + 3 = 5. The digit sum of 23 is not strictly less than 5.

b. Using the function in part a, create a data frame with two columns. The first column, named Nmax should contain the numbers 10, 100, 1000, 10000, 100000, 1000000. The second column, named ‘Probability’ should contain the corresponding probability (the probability that the sum of the digits of a randomly chosen number between 1 and Nmax is less than 5). Finally, use the kable() function from the knitr package to format this data frame as a table in your PDF document (the desired table output is shown below, the ? should be replaced by the computed probabilities). Nmax Probability 10 0.5 100 ? 1000 ? 10000 ? 100000 ? 1000000 ?

Your submission should include the R code for parts a and b. You should also display the table specified in part b.

 

This IT Assignment has been solved by our IT experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.
Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.

Get It Done! Today

Country
Applicable Time Zone is AEST [Sydney, NSW] (GMT+11)
+

Every Assignment. Every Solution. Instantly. Deadline Ahead? Grab Your Sample Now.