A consumer protection group regularly monitors gas prices in southern California. One day (several years ago), they randomly sampled the prices for regular unleaded gasoline at 20 gas stations. Those prices were: 3.95, 4.07, 4.14, 4.04, 4.00, 3.93, 3.98, 4.01, 3.90, 4.03, 4.13, 3.88, 4.03, 4.10, 3.81, 4.18, 3.88, 4.02, 4.13, 4.21 ## (a) In RStudio, create a variable to hold the sampled gas prices and enter the data (use the c() function to create a vector, rather than creating a data frame) (b) Calculate and print the mean of the sample. Use the cat() function for your output. (c) Calculate and print the standard deviation of the sample. Use the cat() function for your output.
A consumer protection group regularly monitors gas prices in southern California. One day (several years ago), they randomly sampled the prices for regular unleaded gasoline at 20 gas stations. Those prices were: 3.95, 4.07, 4.14, 4.04, 4.00, 3.93, 3.98, 4.01, 3.90, 4.03, 4.13, 3.88, 4.03, 4.10, 3.81, 4.18, 3.88, 4.02, 4.13, 4.21 ## (a) In RStudio, create a variable to hold the sampled gas prices and enter the data (use the c() function to create a vector, rather than creating a data frame) (b) Calculate and print the mean of the sample. Use the cat() function for your output. (c) Calculate and print the standard deviation of the sample. Use the cat() function for your output.
Glencoe Algebra 1, Student Edition, 9780079039897, 0079039898, 2018
18th Edition
ISBN:9780079039897
Author:Carter
Publisher:Carter
Chapter10: Statistics
Section10.6: Summarizing Categorical Data
Problem 10CYU
Related questions
Question
100%
A consumer protection group regularly monitors gas prices in southern California. One day (several years ago), they randomly sampled the prices for regular unleaded gasoline at 20 gas stations. Those prices were: 3.95, 4.07, 4.14, 4.04, 4.00, 3.93, 3.98, 4.01, 3.90, 4.03, 4.13, 3.88, 4.03, 4.10, 3.81, 4.18, 3.88, 4.02, 4.13, 4.21 ## (a) In RStudio, create a variable to hold the sampled gas prices and enter the data (use the c()
(b) Calculate and print the mean of the sample. Use the cat() function for your output.
(c) Calculate and print the standard deviation of the sample. Use the cat() function for your output.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 5 steps with 12 images
Recommended textbooks for you
Glencoe Algebra 1, Student Edition, 9780079039897…
Algebra
ISBN:
9780079039897
Author:
Carter
Publisher:
McGraw Hill
Holt Mcdougal Larson Pre-algebra: Student Edition…
Algebra
ISBN:
9780547587776
Author:
HOLT MCDOUGAL
Publisher:
HOLT MCDOUGAL
Glencoe Algebra 1, Student Edition, 9780079039897…
Algebra
ISBN:
9780079039897
Author:
Carter
Publisher:
McGraw Hill
Holt Mcdougal Larson Pre-algebra: Student Edition…
Algebra
ISBN:
9780547587776
Author:
HOLT MCDOUGAL
Publisher:
HOLT MCDOUGAL