Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You will submit your answers in the Probability Lab Quiz located in the July 3rd module on canvas. All answers should be rounded to 4

You will submit your answers in the "Probability Lab Quiz" located in the July 3rd module on canvas. All answers should be rounded to 4 decimal places. Use the Dice dataframe defined in the example and the subset command to define the following events: Event A: The sum of the three dice is greater than twelve. Event B: At least one of the three dice rolled is a six. Here is a website with common operators in R: https://www.statmethods.net/management/operators.html that you might find helpful as you define these two events. 1. What is the R code you used to define event A? 2. What is the probability of A? 3. What is the R code you used to define event B? 4. What is the probability of B? For this section use the seed 5555 so that your answers will match those in the canvas quiz. Create a dataframe named Roll that randomly rolls a three six-sided dice 216 times. You may use the code from the example to create the Roll dataframe once you have set the seed. Use the Roll dataframe and the subset command to define the following events (remember that the variables are named V1, V2 & V3 in this dataframe): Event A1: The sum of the three dice is greater than twelve. Event B1: At least one of the three dice rolled is a six. 5. What is the R code you used to define event A1 for your random Roll? 6. What is the empirical probability of A1 based on Roll? 7. What is the R code you used to define event B1 for your random Roll? 8. What is the probability of B1 based on Roll? For this section use the seed 6666 so that your answers will match those in the canvas quiz. In statistics, as the sample size grows, the empirical probability should approach the mathematical probability. Create a dataframe named Roll2 that randomly rolls three six-sided dice 1000000 times rather than just 216 times as shown in the exam (this may take a few seconds to process). Use the Roll2 dataframe and the subset command to define the following event: Event A2: The sum of the three dice is greater than twelve. 9. What is the empirical probability of A2 based on Roll2? 10. How does this compare to the mathematical probability found in question 2.

Contingency Tables: In the July 3rd module there is a dataset named "Spring.csv". Download this file and then upload it into your R environment using the Upload button in the lower righthand quadrant of R. Caution: Do not create new folders in R as R will only look for uploaded *.csv files in the base folder. Once the data is uploaded into your Rstudio account, you can import it into your global environment using the following code: After running this code, you should see the variable "Spring" listed in your global environment in the upper righthand quadrant of R. This file contains the answers that 238 students from my Spring 2023 STA 381 courses gave to several categorical questions in an anonymous survey. The following variables are included: Modality, Personality, Relationship, Gender, APCalc, Residency, Hand, Important, Motivation, and Pet. When working with categorical data for two variables, it is often useful to summarize the data in a contingency table. From there, probabilities can be calculated. Example: Consider the survey data from my Spring 2023 STA 381 courses. Let's look at the events "Modality" and "Personality". I can find a contingency table of counts using the following code: When I run this code, I get the following readout in the console: This table tells me that 78 of the 238 students were both online and introverted and 36 of the 238 students were both in seat and extroverted. Using this table, I can calculate the following probabilities using the probability rules from chapter 2 or R code. When the variable Table is followed by brackets, the first entry before the comma indicates the and the entry after the comma indicates the column. If an entry is left blank, all rows or columns will be used. For example, to calculate the probability that a student is in the in seat section, we would sum the entire top row: sum(Table[1,]) and divide by the total of the entire table: sum(Table). We can verify our R code using the rules of mathematical probability: (In Seat) = 36 + 84 238 0.5024 To calculate the probability of being in the in seat section given the student is introverted, we would find the probability that both of these conditions exist: sum(Table[1,2]) and divide by the sum of the introverted students from both section which is the second column: sum(table[,2]). Once again, we can verify using the rules of probability. (In Seat|Introverted) = 84 84 + 78 0.5185

Problem Set II: Use the Spring.csv file to define the following events. To view the entire dataset, press on "Spring" under the global environment. Event A: The student is most motivated by money. Event B: The student took AP Calculus in high school. Answer the following questions. 11. What R code could be used to find ()? 12. What is ()? (three decimal places) 13. What R code could be used to find ()? 14. What is ()? (three decimal places) 15. What is ( )? (three decimal places) 16. What is ( )? (three decimal places) 17. What is (|)? (three decimal places) Answer the following questions using the data given in "Spring.csv". 18. Given a student is female, what is the probability that they are in a relationship? 19. What is the probability that a student is both left-handed and prefers a dog as a pet? 20. What is the probability that a student either prefers a dog as a pet or has out-of-state residency?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Calculus Early Transcendentals

Authors: James Stewart

8th edition

1285741552, 9781305482463 , 978-1285741550

More Books

Students also viewed these Mathematics questions

Question

3.3 Explain how to develop the habit of self-leadership.

Answered: 1 week ago