LAB3 Handout

docx

School

University of Waterloo *

*We aren’t endorsed by this school

Course

292

Subject

Statistics

Date

Feb 20, 2024

Type

docx

Pages

5

Uploaded by ElderDogMaster373

Report
ASSIGNMENT In the classic film, Cool Hand Luke , the protagonist brags that he can eat 50 eggs in a single sitting. To test their memory of the film, a sample of thirteen individuals who had watched Cool Hand Luke were asked to recount the number eggs involved in the wager. The following scores reflect their responses. Determine the typical number of eggs remembered in the movie using the mean and the median. 40, 30, 50, 40, 50, 40, 50, 60, 80, 50, 60, 30, 70. QUESTION 1: 1) Create a Frequency Distribution Table. Add columns for fX, cf, and c% (4 marks) Score (X) Frequency (f) fX Cumulative Frequency (cf) Cumulative Percentage (c%) 30 2 60 2 15.38% 40 3 120 5 38.46% 50 4 200 9 69.23% 60 2 120 11 84.62% 70 1 70 12 92.31% 80 1 80 13 100.00% 2) Calculate the Mean (4 marks). 3) Calculate the median by finding the middle score (2 marks). Both questions answered in photo
2) Calculate the Mean (4 marks). 3) Calculate the median by finding the middle score (2 marks). Both questions answered in photo
4) Using the frequency distribution table, expand the first column so that each row represents a single case (or participant) (2 marks). 5) Calculate the variance and standard deviation of the scores using the definitional formulas (5 marks). Both questions answered in photo
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
6) Compare this question to the one demonstrated by the TA. How are they different? What effect did this have on central tendency and variability (3 marks)? The TA used smaller numbers, but the fundamental concepts and calculations remain the same. Despite the difference in the range of values, both examples serve to demonstrate how to compute central tendency (mean, median) and variability (variance, standard deviation) from a given dataset. The closeness of the mean and median in this case suggests a relatively balanced distribution, indicating consistency in the spread of scores. While the expanded distribution provides a clearer picture of individual responses, the effect on central tendency and variability remains minimal, highlighting the robustness of these statistical measures across different datasets.
QUESTION 2 – Descriptive Statistics using R 1. In R, create a vector called Eggs and fill it with the 13 observations used for question 1. 2. Sort your new vector from lowest to highest. 3. Using R, confirm your answers for question one (Mean, Median, Mode, Variance, and standard deviation). 4. Using R, determine the first, second, and third quartiles. Copy your code here: > Eggs <- c(40, 30, 50, 40, 50, 40, 50, 60, 80, 50, 60, 30, 70) > Eggs_sorted <- sort(Eggs) > mean_eggs <- mean(Eggs) [1] 50 > median_eggs <- median(Eggs) [1] 50 > library(DescTools) > mode_eggs <- Mode(Eggs) [1] 50 attr(,"freq") [1] 4 > var_eggs <- var(Eggs) [1] 216.6667 > sd_eggs [1] 14.7196 > Q1 <- quantile(Eggs, 0.25) > Q1 25% 40 > Q2 <- quantile(Eggs, 0.5) # Same as median > Q2 50% 50 > Q3 <- quantile(Eggs, 0.75) > Q3 75% 60