0% found this document useful (0 votes)
3 views3 pages

Lab 1

The document is a lab assignment for a statistics course that includes instructions for completing problems related to population vs. sample identification, fallacies, sampling methods, variable types, circumference calculation, and R coding tasks. It consists of specific questions and examples that require students to apply their knowledge of probability and data analysis. Students are instructed to save their work as a PDF and upload it to a designated dropbox after completion.

Uploaded by

Jonathan Palmer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views3 pages

Lab 1

The document is a lab assignment for a statistics course that includes instructions for completing problems related to population vs. sample identification, fallacies, sampling methods, variable types, circumference calculation, and R coding tasks. It consists of specific questions and examples that require students to apply their knowledge of probability and data analysis. Students are instructed to save their work as a PDF and upload it to a designated dropbox after completion.

Uploaded by

Jonathan Palmer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

STAT 2332 – Probability and Data Analysis

Lab 1

Instructions:
• Write your answer to each problem and copy your R code and output!
• After you finish all the problems save it and upload it to Lab dropbox in D2L
as PDF file.

1. Identify if the information is coming from a population or a sample.

(a) A high school English teacher is interested in the colleges that her AP
students will be attending in the fall. She surveys all students in her AP English
class.

Population

(b) I am curious to know more about the fulfillment of Starbuks employees with
their jobs. I will survey employees from 3 branches in our city regarding their
future endeavors and identify if they plan to leave their job soon or stay longer.

Sample

2. Identify the type of fallacy being described with the following statement.
(a) I ate an uncooked hamburger, and I did not get sick, so it must not be as unsafe
as people claim.

Anecdotal evidence fallacy

(b) There is no proof of life on other planets, so we are the only ones in the
universe.

No evidence fallacy

3. Identify the type of sampling method for the following situation.

(a) Walmart corporate wants to hear feedback from their employees, so they
select 10 stores at random throughout the Georgia state to conduct a survey.

Cluster sample

(b) To investigate the keyboard reliability issues in MacBooks released in 2016,


Apple drafts a repair participation program and posts within the Apple
subreddit to gather customers who have this issue and spread the word.
Snowball sample
4. For the following variables, identify the type of variable it is and its level of
measurement.
Variable Type of the Level of the
Variable measurement
Hours spent in a gym per week Numerical Ratio

Smartphone brands Categorical Nominal

AP Exam scores (1,2,3,4, or 5) Categorical Ordinal

5. Use the equation below to calculate the circumference (C) of the circle with
radius (r) 3?

C = 2𝜋r
r <- 3

2*pi*r

> r <- 3
> 2*pi*r
[1] 18.84956

6. Write a new efficient R code for each problem below that gives you the same
result.

(a) v1 <- c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)


seq(1, 4)

(b) v2 <- c(5, 10, 15, 20, 25, 30, 35, 40, 45, 50)
seq(5, 50, 5)

(c) v3 <- c(1, 1, 1, 1, 1, 1, 1 ,1 ,1 ,1)


rep(1, 10)

7. Write R code to construct below 2 by 2 Matrix.


(Hint: Don’t forget to put row names and column names.)
mat.elem <- c(7,5,6,12)
mat <- matrix(mat.elem, nrow = 2,ncol = 2)

rownames(mat) <- c("Brown", "Gold")


colnames(mat) <- c("Male", "Female")

Brown Gold
Male 7 6
Female 5 12

You might also like