Calculate the mean median and standard deviation and get


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. 

data reactiontime;

input stimulus$ sex$ age time$ IQ reaction;

lines;

visual  female 47 AM 115 393

visual  male  76 PM 99 592

auditory male  24 AM 119 408

tactile male  68 PM 97 512

visual  female 27 AM 118 297

visual  male  25 AM 128 341

auditory female 33 PM 116 405

tactile female 26 AM 90 539

visual  male  22 PM 109 495

visual  female 24 AM 101 360

tactile female 43 PM 110 544

visual  female 76 AM 97 573

visual  female 45 AM 109 500

tactile male  31 AM 114 269

visual  male  44 PM 107 385

tactile male  42 AM 108 606

tactile female 36 AM 100 487

auditory female 29 PM 116 449

auditory male  60 AM 135 552

visual  female 61 PM 119 508

auditory female 57 PM 116 510

auditory male  60 AM 117 580

auditory female 56 PM 118 457

visual  female 64 PM 104 493

auditory female 78 PM 115 703

auditory female 38 AM 95 495

auditory male  25 AM 102 336

visual  female 44 PM 104 429

visual  male  35 AM 123 270

tactile female 75 AM 109 704

visual  male  36 AM 126 251

tactile female 22 AM 107 394

auditory female 39 PM 114 478

auditory male  42 AM 125 425

visual  male  64 AM 103 467

auditory female 47 AM 105 436

auditory female 75 AM 85 506

auditory female 25 AM 109 407

visual  male  64 AM 120 539

tactile male  43 PM 119 489

tactile female 34 AM 119 414

visual  female 22 PM 117 405

tactile male  52 AM  92 405

visual  female 53 PM 110 498

visual  male  57 PM 100 444

visual  male  21 AM 111 212

visual  female 23 PM 104 298

tactile female 67 AM 94 588

tactile female 32 PM 114 352

auditory male  57 PM 107 647

auditory female 55 AM 119 603

tactile female 80 PM 107 700

tactile male  41 AM 119 471

tactile male  21 AM 119 446

tactile female 63 PM 113 537

visual  male  46 AM 94 475

visual  female 54 PM 112 366

visual  female 55 PM 112 474

visual  male  66 AM 111 587

visual  male  33 AM 118 396

tactile male  74 AM 99 531

auditory male  31 PM 116 460

auditory female 65 AM 86 495

auditory female 51 PM 120 527

visual  male  38 PM 96 422

auditory female 29 AM 103 442

visual  male  60 AM 111 356

visual  female 78 AM 107 365

tactile male  68 PM 102 634

visual  male  27 AM 93 381

visual  female 46 AM 108 408

tactile male  32 AM 122 504

visual  male  64 AM 118 477

visual  female 42 AM 111 403

auditory female 55 AM 111 450

visual  female 69 PM 102 528

visual  male  59 PM 129 454

tactile male  77 AM 100 665

visual  female 51 PM 119 498

auditory female 59 AM 109 484

visual  male  30 AM 115 357

auditory female 27 PM 107 327

tactile female 64 AM 130 475

visual  male  50 PM 108 479

visual  male  51 PM 95 512

tactile female 46 AM 112 545

tactile female 58 PM 100 585

auditory male  27 AM 122 492

auditory female 60 AM 92 644

auditory male  51 AM 111 383

visual  male  76 AM 105 492

auditory male  22 AM 109 381

tactile female 46 AM 106 359

tactile male  74 AM 97 602

auditory female 78 AM 103 543

auditory male  30 PM 114 341

tactile female 59 AM 110 668

visual  female 48 PM 88 597

auditory female 43 AM 110 472

visual  female 49 PM 115 436

auditory female 65 AM 122 511

visual  female 69 AM 103 576

visual  male  45 PM 112 339

tactile male  49 PM 127 625

visual  male  55 PM 115 428

visual  male  27 PM 110 422

visual  male  75 PM 114 428

visual  male  60 PM 115 597

visual  male  51 AM 110 498

tactile male  54 AM 103 525

visual  male  66 PM 107 593

visual  male  56 AM 100 423

tactile female 37 AM 105 434

auditory female 60 AM 97 445

tactile female 41 PM 117 573

auditory female 43 PM 91 440

tactile male  52 PM 113 627

visual  female 73 AM 113 502

tactile female 53 PM 111 541

tactile female 72 PM 121 572

tactile female 33 AM 117 448

visual  female 33 PM 108 510

visual  male  36 AM 115 420

tactile male  34 AM 102 603

auditory male  39 PM 113 393

auditory male  73 AM 99 455

tactile male  38 PM 110 439

auditory male  41 PM 114 460

tactile female 50 AM 110 416

visual  female 70 AM 92 532

visual  male  76 AM 109 522

visual  male  68 AM 125 538

auditory male  63 PM 106 538

auditory male  47 PM 108 450

tactile male  62 AM 111 569

auditory female 23 PM 116 350

auditory female 78 AM 108 492

auditory female 79 PM 106 657

visual  female 40 PM 102 456

auditory female 42 PM 123 478

auditory male  40 PM 110 398

tactile male  54 AM 118 544

visual  male  66 AM 119 494

visual  female 78 AM 103 561

tactile female 26 AM 122 419

auditory male  40 PM 122 344

visual  female 63 AM 107 393

visual  male  24 PM 105 359

auditory female 60 PM 130 456

tactile male  38 PM 125 257

tactile female 32 AM 106 452

auditory female 45 AM 126 364

auditory male  27 PM 131 441

auditory female 73 AM 124 558

tactile male  38 AM 110 485

auditory female 69 AM 110 529

tactile female 53 AM 107 611

tactile female 40 AM 104 541

auditory female 66 AM 116 510

visual  male  68 PM 109 682

tactile male  57 PM 100 503

visual  female 41 PM 99 456

auditory female 40 PM 103 534

visual  male  79 AM 108 483

auditory male  26 PM 104 465

tactile male  71 PM 102 622

visual  female 64 PM 120 522

auditory female 72 AM 99 440

tactile male  48 AM 120 549

visual  female 24 AM 110 242

auditory female 45 PM 111 463

visual  male  34 AM 120 352

visual  female 68 AM 104 480

auditory male  67 PM 115 542

visual  female 78 AM 123 498

tactile female 33 AM 105 416

tactile female 50 PM 116 607

tactile female 62 AM 122 437

visual  male  64 AM 108 415

auditory female 64 AM 106 490

tactile male  44 PM 93 603

visual  male  47 AM 104 494

visual  female 66 AM 117 387

auditory female 78 PM 114 573

visual  male  24 AM 120 281

tactile male  61 AM 114 489

visual  female 75 PM 117 527

tactile male  39 PM 124 356

visual  male  80 PM 109 563

auditory female 47 AM 117 380

auditory male  31 AM 111 512

tactile male  33 AM 105 534

visual  female 43 PM 103 431

auditory female 33 AM 110 498

tactile male  33 AM 109 491

visual  male  66 PM 101 573

auditory female 41 PM 116 388

visual  male  78 AM 110 570

tactile male  55 AM 115 514

visual  male  22 AM 103 370

visual  female 59 AM 101 374

tactile male  26 AM 116 345

visual  female 50 PM  96 432

auditory male  72 AM 102 475

visual  male  46 AM 111 499

auditory male  43 AM 97 462

visual  female 52 AM 88 457

tactile male  79 PM 117 575

auditory female 39 PM 107 465

visual  male  77 AM 116 373

auditory female 66 AM 103 646

tactile male  56 PM 107 596

visual  male  47 PM 125 438

auditory female 60 PM 132 545

visual  female 44 AM 107 359

auditory male  55 AM 114 549

auditory male  51 AM 119 389

auditory male  52 PM 108 363

visual  male  77 PM 112 637

visual  female 37 AM 117 347

auditory male  74 PM 120 594

visual  male  42 AM 114 395

visual  female 48 PM 100 599

tactile male  46 PM 107 419

auditory female 76 PM 121 524

visual  male  46 AM 108 394

auditory female 32 PM 104 531

auditory female 68 AM 112 406

tactile female 30 PM 110 350

visual  male  70 PM 105 591

auditory female 44 PM 116 496

visual  female 65 PM 99 573

auditory male  27 PM 105 462

auditory male  70 PM 114 678

tactile male  61 PM 110 576

visual  male  29 PM 118 389

auditory female 67 AM 99 524

tactile male  31 AM 110 403

tactile female 41 PM 111 504

visual  male  73 PM 109 628

tactile female 38 PM 92 389

tactile male  57 PM 108 495

visual  female 62 AM 101 450

visual  female 53 AM 77 501

tactile female 50 PM 106 412

tactile male  78 AM 119 433

visual  female 75 AM 99 540

tactile male  55 PM 109 573

auditory female 57 PM 98 560

visual  female 77 AM 116 513

visual  male  44 AM 120 395

visual  female 80 PM 103 523

visual  male  28 AM 114 360

tactile male  63 PM 110 595

tactile female 80 AM 113 822

tactile male  52 AM 104 405

visual  female 73 AM 113 528

visual  male  21 AM 116 232

visual  female 75 AM 112 505

visual  female 65 PM 103 561

visual  female 58 PM 101 459

visual  male  50 PM 111 399

auditory female 39 PM 115 482

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.

Request for Solution File

Ask an Expert for Answer!!
Applied Statistics: Calculate the mean median and standard deviation and get
Reference No:- TGS0629593

Expected delivery within 24 Hours