MGSC 291 Farnoush Exam 1 Review

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/61

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 11:15 PM on 9/20/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

62 Terms

1
New cards

Multiplication in R

a. *

b. /

c.#

d.^

e.

a. *

2
New cards

Division in R

a. *

b. /

c.#

d.^

e.

b./

3
New cards

Comment in R

a. *

b. /

c.#

d.^

e.

c. #

4
New cards

Assignment (is defined to be) in R

a. *

b. /

c.#

d.^

e.

e.

5
New cards

Exponent in R

a. *

b. /

c.#

d.^

e.

d. ^

6
New cards

When using the length() function on the object VEC and executing the line of code, it returns...

a. multiple values

b. it may be a single number or multiple values

c. a single number

c. a single number

7
New cards

After defining the object vec, if you type vec into the R console and hit Enter/Return, what is returned on the next line in the R console?

a. the word "vec"

b. the printed contents of the object vec

c. summary stats about the object vec

b. the printed contents of the object vec

8
New cards

the log() function in R takes...

a. natural log (log base e)

b. log base 10

c. log base 2

a. natural log (log base e)

9
New cards

& in R

a. and

b. or

c. greater than or equal

a. and

10
New cards

| in R

a. equals

b. not equal to

c. or

c. or

11
New cards

== in R

a. or

b. equals

c. greater than or equal to

b. equals

12
New cards

!= in R

a. not equal to

b. or

c. equals

a. not equal to

13
New cards

vector == 5 returns...

a. 2

b. 2 5

c. FALSE TRUE FALSE FALSE TRUE

c. FALSE TRUE FALSE FALSE TRUE

14
New cards

sum(vector == 5) returns...

a. 2

b. 2 5

c. FALSE TRUE FALSE FALSE TRUE

a. 2

15
New cards

which(vector == 5) returns...

a. 2

b. 2 5

c. FALSE TRUE FALSE FALSE TRUE

b. 2 5

16
New cards

I moved the Wine.csv file to the working directory and ran the following line of code to read in the data and store it in the object wine. What does this code return, and why?

wine

b. it returns error because "Wine" is misspelled

17
New cards

Choose all that apply. Which of the following will allow you to view the spelling of a column name in R?

a. is.na(wine)

b. names(wine)

c. str(wine)

d. ncol(wine)

e. nrow(wine)

b. names(wine)

c. str(wine)

18
New cards

You want to check the exact spellings of sub-regions in the wine dataset. Which of the following R commands should you use?

a. nrow (winesub.region)</p><p>b.ncol(winesub.region)</p><p>b. ncol (winesub.region)

c. sum(winesub.region)</p><p>d.summary(winesub.region)</p><p>d. summary(winesub.region)

d. summary(wine$sub.region)

19
New cards

Which of the following would return the number of wines with a price in the dataset?

a. Running the sum() and is.na() functions on price column

b. Running the sum() and is.na() functions on wine dataset

c. Running the ! point operator with sum() and is.na() functions on price column

c. Running the ! point operator with sum() and is.na() functions on the price column

20
New cards

When using the mean() function to calculate the average price in the wine dataset, is it necessary to include the argument na.rm = T? Why?

a. Yes, because we want to convert character data to numeric

b. Yes, because this column has missing values, the na.rm = TRUE argument is necessary for the mean() function to exclude them from the calculation

c. No, because the price column does not have missing values

b. Yes, because this column has missing values, the na.rm = TRUE argument is necessary for the mean() function to exclude them from the calculation

21
New cards

What does this line of code return:

mean(winepoints[winepoints [winevariety== " Cabernet Blend" | wine$sub.region == "Napa-Sonoma"])

a. Average points for wines that are Cabernet Blend and are from the Napa-Sonoma sub-region

b. Average price for wines that are Cabernet Blend and are from the Napa-Sonoma sub-region

c. Average points for wines that are either Cabernet Blend or are from the Napa-Sonoma sub-region

d. Average number of wines that are either Cabernet Blend or from the Napa-Sonoma sub-region

c. Average points for wines that are either Cabernet Blend or are from the Napa-Sonoma sub-region

22
New cards

percent of households in this large city that are headed by a single woman

a. statistic

b. parameter

c. sample

d. population

b. parameter

23
New cards

26.5% = percent of the 200 surveyed households that are headed by a single woman

a. statistic

b. parameter

c. sample

d. population

a. statistic

24
New cards

all households in this large city

a. statistic

b. parameter

c. sample

d. population

d. population

25
New cards

the 200 houses surveyed

a. statistic

b. parameter

c. sample

d. population

c. sample

26
New cards

Gender is a ___________ variable

a. categorical - ordinal

b. quantitative

c. categorical - nominal

c. categorical - nominal

27
New cards

Salary is a _______ variable

a. categorical - ordinal

b. quantitative

c. categorical - nominal

b. quantitative

28
New cards

These side-by-side boxplots display the salary distribution (many observations for salary) across 2 categories (broken out by gender). If we had data such that we had one observation for each gender, we should use

a. pie chart

b. bar chart

c. line graph

d. histogram

b. bar chart

29
New cards

If the bins are high on the left and tail off towards the right this is...

a. symmetric

b. skewed left

c. skewed right

d. bimodal

c. skewed right

30
New cards

If the data is skewed right then mean is ______ median

a. greater than

b. less than

c. equal to

a. greater than

31
New cards

If the data is skewed left then mean is ______ median

a. greater than

b. less than

c. equal to

b. less than

32
New cards

When should you choose a boxplot over a histogram? (When would a boxplot be better)

a. When you want to emphasize the shape of the distribution

b. When you want to feature the mean and standard deviation

c. When you have a very large number of observations

d. When you want to compare light beer sales by container (bottle, can, keg, etc..)

d. When you want to compare light beer sales by container (bottle, can, keg, etc..)

33
New cards

Which measure of center can be used for a categorical variable?

a. mean

b. median

c. mode

d. IQR

c. mode

34
New cards

The standard deivation expressed as a percent of the mean is the

a. mean standard error

b. standard error of the mean

c. Z-score

d. coefficient of variation

d. coefficient of variation

35
New cards

Data on sales revenue, number of customers, and expenses for last month at each Starbucks (more than 20,000 locations as of 2012) would be...

a. cross-sectional

b. time series

c. panel data

a. cross-sectional

36
New cards

To compare the variation for two distributions with different units you should use the ...

a. coefficient of variation

b. z-score

a. coefficient of variation

37
New cards

To compare two observations from distributions with differnet units you should use the ...

a. coefficient of variation

b. z-score

b. z-score

38
New cards

What happens to the mean when an observation is added to the low end of the distribution?

a. it gets lower

b. it gets higher

c. it stays the same

a. it gets lower

39
New cards

What happens to the standard deivation if an observation is added to the low end of the distribution?

a. it gets lower

b. it gets higher

c. it stays the same

b. it gets higher

40
New cards

What happens to the mean when an observation is added to the high end of the distribution?

a. it gets lower

b. it gets higher

c. it stays the same

b. it gets higher

41
New cards

What happens to the standard deivation if an observation is added to the high end of the distribution?

a. it gets lower

b. it gets higher

c. it stays the same

a. it gets lower

42
New cards

When is it improper to use Z-scores for comparison?

a. when the distributions have different shapes

b. when the distributions are measured in different units

c. when the distributions have different means

a. when the distributions have different shapes

43
New cards

Suppose a dataset has a calculated skewness of -1.372. This means that the distribution is

a. symmetric

b. skewed to the left

c. skewed to the right

b. skewed to the left

44
New cards

The kurtosis() function in the {moments} package in R computes the kurtosis, which uses

a. 0 as a baseline instead of 3

b. 3 as the baseline instead of 0

b. 3 as the baseline instead of 0

45
New cards

The baseline kurtosis is based on comparing the tails of a distribution to

a. any symmetric distribution

b. the uniform distribution

c. the normal distribution

c. the normal distribution

46
New cards

The kurtosis of Stock A's returns is 3.157 and for Stock B it is 4.596. Which one has more kurtosis risk?

a. Stock A

b. Stock B

c. They are both higher than 3, so they are the same in terms of kurtosis risk.

b. Stock B

47
New cards

The coefficient of variation is also know as

a. risk to return

b. return to risk

a. risk to return

48
New cards

The return to risk for Stock A is 0.12 and for Stock B is 0.27. Based on this measure, which one is safer?

a. Stock A

b. Stock B

c. They are both positive so the same in terms of risk.

b. Stock B

49
New cards

If you get a + instead of the command prompt, >, after hitting Enter/Return in R, this means

a. you are performing addition

b. you need to hit Enter/Return again

c. you you didn't close out a parenthesis, quote, etc...

c. you you didn't close out a parenthesis, quote, etc...

50
New cards

The summary() function applied to a categorical variable will return

a. a count of all the unique values

b. the five number summary and mean

c. max, min, mean, and standard deviation of the counts

a. a count of all the unique values

51
New cards

Suppose we define a vector to be the numbers 20, 20, 5, and 10 and call it vec4 as follows:

vec4

a. 1

52
New cards

What does the following code do in R?

mean(dNameshipping[dNameshipping [dNameweight=="high"])

a. calculates average shipping for heavy items

b. calculates average weight for high shipping

a. calculates average shipping for heavy items

53
New cards

A unique number is assigned to each transaction in a database. We would say that this transaction number is a/an

a. categorical variable

b. quantitative variable

c. identifier variable

c. identifier variable

54
New cards

"Highway MPG" is what type of variable?

a. Identifier

b. Quantitative

c. Categorical Ordinal

d. Categorical Nominal

b. Quantitative

55
New cards

A year's worth of the daily number of packages delivered for UPS route

a. bar graph

b. scatter plot

c. histogram

d. line graph

d. line graph

56
New cards

A year 2022 number of packages for top 10 UPS drivers (for each driver there is a single number of total packages)

a. bar graph

b. scatter plot

c. histogram

d. line graph

a. bar graph

57
New cards

The annual number of packages delivered in 2022 for all routes. You have one big list of numbers.

a. bar graph

b. scatter plot

c. histogram

d. line graph

c. histogram

58
New cards

For each route, you have data on the time between deliveries and number of packages delivered

a. bar graph

b. scatter plot

c. histogram

d. line graph

b. scatter plot

59
New cards

Interpret what it means for an observation from this distribution to have a Z-score of -2.

a. This observation is 2 minutes below average.

b. This observation is 2 minutes above average.

c. This observation is 2 standard deviations below average.

d. This observation is 2 standard deviations above average.

c. This observation is 2 standard deviations below average.

60
New cards

The kurtosis computed in R has a baseline of ____ and this baseline is base on ____________.

a. 0, exponential distribution

b. 0, normal distribution

c. 3, exponential distribution

d. 3, normal distribution

d. 3, normal distribution

61
New cards

If an investor wanted a less risky stock, they should choose the one with

a. lower return to risk

b. higher return to risk

b. higher return to risk

62
New cards

1/CV (the reciprocal of the coefficient of variation) is also know as

a. risk to return

b. return to risk

b. return to risk