Problem 1. This problem is meant for you to familiarize yourself with running R commands and interpret the output. Use the given R commands, obtain the corresponding output and answer any questions that might be given. Note: Your solutions should include the R commands used, corresponding R output, and any comments and/or interpretations. a. Find the radius of a circle with a radius of 4. Execute the following command: pi*4 2 b. Create a vector X consisting of the numbers 24, 23, 6, 10, 3, 5, 8, 33. Execute the following command: X <- c(24, 23, 6, 10, 3, 5, 8, 33) c. Following up to part b, what is the sum of the numbers in the vector X? Execute the following command: sum (X) Problem 2. File Preview The ToothGrowth dataset built into R collects the tooth length of 60 guinea pigs. Each animal received one of three dose levels of vitamin C (0.5, 1, and 2 mg/day) by one of two delivery methods, orange juice or ascorbic acid (a form of vitamin C and coded as VC). a. Load the dataset and display the first few observations. Execute the following command and find the tooth length of the first guinea pig observation. head (ToothGrowth) b. What is the longest tooth length out of all the guinea pigs? Execute the following command: max (ToothGrowth$len) Problem 3. Exercise 1.3.1 of Samuels, Witmer, and Schaffner (1989) In each of the following studies, identify which sampling technique best describes the way the data were collected: simple random sampling, random cluster sampling, or stratified random sampling. For cluster samples identify the clusters, and for stratified samples identify the strata. a. All 257 leukemia patients from three randomly chosen pediatric clinics in the United States were enrolled in a clinical trial for a new drug. b. A total of twelve 10-g soil specimens were collected from random locations on a farm to study physical and chemical soil profiles. c. In a pollution study three 100-ml air specimens were collected at each of four specific altitudes (100 m, 500 m, 1000 m, 2000 m) for a total of twelve 100-ml specimens. d. Twenty-four dogs (eight randomly chosen small breed, eight randomly chosen medium breed, and eight randomly chosen large breed) were enrolled in an experiment to evaluate a new training program.
Problem 1. This problem is meant for you to familiarize yourself with running R commands and interpret the output. Use the given R commands, obtain the corresponding output and answer any questions that might be given. Note: Your solutions should include the R commands used, corresponding R output, and any comments and/or interpretations. a. Find the radius of a circle with a radius of 4. Execute the following command: pi*4 2 b. Create a vector X consisting of the numbers 24, 23, 6, 10, 3, 5, 8, 33. Execute the following command: X <- c(24, 23, 6, 10, 3, 5, 8, 33) c. Following up to part b, what is the sum of the numbers in the vector X? Execute the following command: sum (X) Problem 2. File Preview The ToothGrowth dataset built into R collects the tooth length of 60 guinea pigs. Each animal received one of three dose levels of vitamin C (0.5, 1, and 2 mg/day) by one of two delivery methods, orange juice or ascorbic acid (a form of vitamin C and coded as VC). a. Load the dataset and display the first few observations. Execute the following command and find the tooth length of the first guinea pig observation. head (ToothGrowth) b. What is the longest tooth length out of all the guinea pigs? Execute the following command: max (ToothGrowth$len) Problem 3. Exercise 1.3.1 of Samuels, Witmer, and Schaffner (1989) In each of the following studies, identify which sampling technique best describes the way the data were collected: simple random sampling, random cluster sampling, or stratified random sampling. For cluster samples identify the clusters, and for stratified samples identify the strata. a. All 257 leukemia patients from three randomly chosen pediatric clinics in the United States were enrolled in a clinical trial for a new drug. b. A total of twelve 10-g soil specimens were collected from random locations on a farm to study physical and chemical soil profiles. c. In a pollution study three 100-ml air specimens were collected at each of four specific altitudes (100 m, 500 m, 1000 m, 2000 m) for a total of twelve 100-ml specimens. d. Twenty-four dogs (eight randomly chosen small breed, eight randomly chosen medium breed, and eight randomly chosen large breed) were enrolled in an experiment to evaluate a new training program.
MATLAB: An Introduction with Applications
6th Edition
ISBN:9781119256830
Author:Amos Gilat
Publisher:Amos Gilat
Chapter1: Starting With Matlab
Section: Chapter Questions
Problem 1P
Related questions
Question
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 2 steps
Recommended textbooks for you
MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc
Probability and Statistics for Engineering and th…
Statistics
ISBN:
9781305251809
Author:
Jay L. Devore
Publisher:
Cengage Learning
Statistics for The Behavioral Sciences (MindTap C…
Statistics
ISBN:
9781305504912
Author:
Frederick J Gravetter, Larry B. Wallnau
Publisher:
Cengage Learning
MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc
Probability and Statistics for Engineering and th…
Statistics
ISBN:
9781305251809
Author:
Jay L. Devore
Publisher:
Cengage Learning
Statistics for The Behavioral Sciences (MindTap C…
Statistics
ISBN:
9781305504912
Author:
Frederick J Gravetter, Larry B. Wallnau
Publisher:
Cengage Learning
Elementary Statistics: Picturing the World (7th E…
Statistics
ISBN:
9780134683416
Author:
Ron Larson, Betsy Farber
Publisher:
PEARSON
The Basic Practice of Statistics
Statistics
ISBN:
9781319042578
Author:
David S. Moore, William I. Notz, Michael A. Fligner
Publisher:
W. H. Freeman
Introduction to the Practice of Statistics
Statistics
ISBN:
9781319013387
Author:
David S. Moore, George P. McCabe, Bruce A. Craig
Publisher:
W. H. Freeman