Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A simple data set using Rguroo, R, you can use a free trial if you don't have it. This week, we are going to do

A simple data set using Rguroo, R, you can use a free trial if you don't have it.

image text in transcribedimage text in transcribedimage text in transcribed
This week, we are going to do sampling and some exploratory data analysis using Rguroo. We will use a dataset that is readily available on Rguroo. Under the Data section, click Data Import - Dataset Repository to open up the Rguroo Repository Data Import window. Under Repository, select R datasets. In the textbox above the Dataset listing, type ToothGrowth to find the dataset ToothGrowth dataset we will use for this week's problem set. If you want to know more about the dataset ToothGrowth, click the Info icon on the right. Repository Dataset Import Search Repository... X Shared Public Repository Description boot R Package boot car R Package car cluster R Package cluster COUNT R Package COUNT R datasets Base R ToothGrowth X Dataset Title Rows Columns Info ToothGrowth The Effect of Vitamin C on Tooth Growth in Guinea Pigs 60 3 Import Close Once you are done viewing the information, click the Import button at the bottom to import the ToothGrowth dataset. Once imported, you should see the ToothGrowth data appear under the list of Datasets on the left panel of your Rguroo. Part I: Answer the following questions regarding basic concepts in Statistics based on the ToothGrowth dataset. Question 1: What are the individuals of interest in the ToothGrowth dataset? Question 2: How many individuals are in the ToothGrowth dataset? Include the unit of measurement in your answer. NO UNIT OF MEASUREMENTS = 0 POINTS for this question.Question 3: There are 3 variables in the ToothG rowth dataset, namely, Tooth length, Supplement Type. and Vitamin Dose Levels. Identify the type of these variables (Qualitative or Quantitative). If the variable is qualitative, determine if it is Nominal or Ordinal. If the variable is quantitative, specify it is Discrete or Continuous. Variable Qualitative OR Quantitative Nominal/0rdinallDiscrete/Continuous Tooth length Supplement Type Vitamin Dose Levels Part II: Now let us apply some of the sampling methods you have learned. Using the ToothGrowth data as our sampling frame, we will do some sampling via gpmo. Under the Probability-Simulation section, click Probability > Random Selection to open the Dataset Random Selection window. Select ToothGrowth for the Dataset. Suppose we want to sample 30 guinea pigs from our sampling frame. Type 30 in the Sample Size box. For consistency in the answers, set the seed to your peer group number (e.g., if you are in Peer Group 1, set the Seed to 001). In the future, you may use any other seed number you want. The default is set at 100. For illustration purposes, I used the Seed 612. We want to sample without replacement, so choose Without under the Replace option. II Dataset Random Selection (0) x Daiaset : ToothGrowm v I ? l Sample Size .i 30 Seed :FB'I 2 l Replications : 1 0 With Replace : Probability : Without Sample a Subset 3 From : To: By : Add Rows: e_g. seq('l .102), which(...) Columns: e.g. 00.5.7) or 2:5 or seq(1,10,2) Split across columns Stacked with the Sample IDs Question 1: With the above setting, generate a simple random sample by clicking the PREVIEW icon. Take a screenshot of the resulting simple random sample dataset and paste it below. Question 2: Now let us do a stratified sampling of the ToothGrowth dataset using the supplement type as the strata. Generate a sample of 15 from each group by specifying the rows to sample from under the Sample a Subset section. For instance, if you want to sample from the OJ group, you will put 31 for the From box and 60 in the To box. (see below) Dataset Random Selection X Dataset : ToothGrowth ? Sample Size : 15 Seed : 612 Replications : 1 With Replace : Probability : Without Sample a Subset ? From : 31 To : 60 By : Add Rows : e.g. seq(1, 10,2), which(...) Columns : e.g. c(1,5,7) or 2:5 or seq(1, 10,2) Split across columns Stacked with the Sample IDs Save the resulting sampled dataset for each group using the Save Dataset As option. ToothGrowth x ; Random_2 x 1 Random_3 x 1 Random_4 x Append x Sample Statistic Preview 135 Save As... Save Dataset As... OJSample Case No. len supp dose 50 50 27.3 0J 45 45 20 0 38 38 9.4 0 D.5 35 35 14.5 0 57 57 26.4 0J 6 43 43 23.6 0 41 41 19.7 0) 36 36 10 0 0.5 52 52 26.4 0J 2 37 37 8.2 0 0.5 33 33 17.6 0) .5 46 46 25.2 0 55 24.8 0 48 21.2 0 54 24.5 0J Do the same for the VC group. Then use the Append function under the Data Functions (Functions -> Append) to create the Stratified Sample Dataset. In the Data Append window, place the names of the saved dataset from each supplement type group. Then choose Common in the Include section and Sorted (Asc.) in the Keep Order. Then click the PREVIEW icon to view the resulting combined data. Take a screenshot of the resulting stratified sample dataset and paste it below

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

Elements Of Chemical Reaction Engineering

Authors: H. Fogler

6th Edition

013548622X, 978-0135486221

More Books

Students also viewed these Mathematics questions

Question

Why BPO has been called a Sociotechnical Innovation?

Answered: 1 week ago