SCA 02q

SCA 02q: SCA Check

Purpose

The purpose of this entire statistical computing activity is to show you how to have R help you do statistics. Statistics is not just calculating the values; it is also interpreting the values. To that end, this entire SCA concerned getting R to graph variables and to calculate sample statistics. This part helps test that you have learned this.

The Procedure

The following are common start-up instructions. You will want to always follow them when starting analyses.

  1. Start R and open a new script.
  2. Now, since we will be using some special R functions that do not exist in the base R package, we will need to import them. Making sure you have an Internet connection, run this line: source("http://rfs.kvasaheim.com/stat200.R") When you run this line, R goes to the URL you specified and runs that code. Here, the code only imports several helpful functions. From now forward, I will assume you run this line for every script in this course.
  3. Load the “crime data set” using the following two lines. dt = read.csv("http://rfs.kvasaheim.com/data/crime.csv") attach(dt) The first line loads the data into the variable dt. The second line “attaches the data,” which makes it easier for us to access the variables in the data file.

 

Questions and Answers

  1. Which region of the United States (as divided into nine regions) has the most state-level entities?
    South Atlantic
  2. What is the mean property crime rate in 1990?
    4734.816 property crimes per 100,000 population
  3. What is the median property crime rate in 1990?
    4705.1 property crimes per 100,000 population
     
  4. What is the z-score for Illinois according to the enrollment rate in 2000?
    -0.8270758
  5. What is the third quartile for Illinois according to the enrollment rate in 2000?
    93.85 percent enrollment
  6. What is the tenth percentile for Illinois according to the enrollment rate in 2000?
    87.3 percent enrollment
     
  7. What is the Hildebrand ratio for the enrollment rate in 2000?
    H = 0.1648958
  8. What is the appropriate measure of center for the enrollment rate in 2000?
    μ = 91.74706 percent enrollment
  9. Calculate the appropriate measure of spread for the enrollment rate in 2000.
    σ = 4.53049 percent enrollment

 

While the answers are provided above, you need to be comfortable with your answers here. That is the final check. If you are unsure, you should return to the previous parts of this activity and redo them until you understand. Remember to experiment!

This page was last modified on 2 January 2024.
All rights reserved by Ole J. Forsberg, PhD, ©2008–2024. No reproduction of any of this material is allowed without explicit written permission of the copyright holder.