Calculate the mean median and standard deviation and state


1. Use these five age values 25,  38,  28,  23,  26

a. Calculate the mean, median, and standard deviation.  Note that this is sample data (every data set you will see this semester is a sample), so use the appropriate formulae.  Do all of these calculations "by hand", and show your work for possible partial credit.

b. Use PROC MEANS to obtain the mean and standard deviation.  Turn in the printout, and highlight these two statistics.  To "highlight", underline, put in bold, or something else that clearly makes these statistics stand out.

2. Use the heart beat data:

No drug:     293   297   300   302   306   311   312   314   318   320   322   323   324

                   324   326   327   331   333   335   339   342   345   345   351   356

    Drug:      330   331   335   337   339   343   346   349

                   350   358   364   369   375   387   398   403

a. Enter all 41 observations into a SAS data set.  Each line of data should have two variables, one that indicates whether or not the person is on the drug, and one that gives the number of heart beats in 5 minutes.  Thus, your program should begin with something like one of the two examples below:

     data two;                       data two;

     input drug$ beats;              input drug$ beats @@;

     lines;                          lines;

     no  293                         no  293    no  297   (etc.)

          no  297

             (etc.)

b. Use PROC SORT to sort the data by drug use (even if it's already be sorted when you enter it), then run PROC UNIVARIATE (with the PLOT and PCTLDEF=4 options) by drug. Thus, you will have a BY statement that corresponds to PROC SORT, and another BY statement that corresponds to PROC UNIVARIATE. Turn in the printouts for both groups, and on the printout for those who are not using the drug, highlight 7 statistics - the mean, standard deviation, and the 5 statistics that make up the 5-number summary.

c. State two numbers - one for each group - that indicate which group has more variation.

d. Is the data for those who are using the drug symmetric, positively skewed, or negatively skewed?  Give number(s) from the printout that support your decision.

3. Use the REACTIONTIME data.

This data set contains six variables: the type of stimulus (auditory, tactile, or visual) to which the person reacted, sex, age, the time of day (AM or PM) the reading was taken, the person's IQ, and the reaction time (in milliseconds).  For the following, turn in the results of the SAS procedures that you are instructed to run.  You will also have to answer a few other questions, using the printout.

a. Use PROC FREQ to get frequencies for the three categorical variables - stimulus type, sex, and time of day.

b. Use PROC FREQ to get a two-way frequency table of stimulus type by sex.  From this, answer the following questions for this data:

 i. What proportion of the sample is female?  

 ii. What proportion of the sample had a visual stimulus?  

 iii. Looking only at those with an auditory stimulus, what proportion is male?

 iv. Looking only at females, what proportion had a tactile stimulus?

c. Create a categorical variable that divides IQ into three groups: less than 100, between 100 and 120 (inclusive), and greater than 120 (use coding similar to that done in lesson #9, when creating an age group variable).  Then, use PROC FREQ to get frequencies for this variable.

d. Use PROC MEANS to get statistics on age.

e. Create a new variable which is reaction time in seconds (divide the reaction time variable in the data set by 1000).  Then use PROC MEANS to get the following statistics for this variable: sample size, mean, standard deviation, Q1, median, and Q3.

f. Use PROC UNIVARIATE, with the PCTLDEF=4 option, to get statistics on IQ.  Use the numeric variable, not the new categorical variable defined in part (c).

g. Using the PROC UNIVARIATE printout from part (f), state the following statistics:

i. the 10th percentile (or '10% Quantile') 

ii. the next-to-largest observation

iii. the variance

iv. the interquartile range (IQR)

h. Use PROC SORT and PROC MEANS (each with BY statements) to get statistics on the original reaction time, separately for the three stimulus types.  Comment on how the means compare for the three stimulus types.

i. Use PROC MEANS and a WHERE statement to get information about age, for AM times only.

Attachment:- Data reactiontime.xlsx

Solution Preview :

Prepared by a verified Expert
Advanced Statistics: Calculate the mean median and standard deviation and state
Reference No:- TGS0768379

Now Priced at $40 (50% Discount)

Recommended (97%)

Rated (4.9/5)