1/61
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Multiplication in R
a. *
b. /
c.#
d.^
e.
a. *
Division in R
a. *
b. /
c.#
d.^
e.
b./
Comment in R
a. *
b. /
c.#
d.^
e.
c. #
Assignment (is defined to be) in R
a. *
b. /
c.#
d.^
e.
e.
Exponent in R
a. *
b. /
c.#
d.^
e.
d. ^
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
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
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)
& in R
a. and
b. or
c. greater than or equal
a. and
| in R
a. equals
b. not equal to
c. or
c. or
== in R
a. or
b. equals
c. greater than or equal to
b. equals
!= in R
a. not equal to
b. or
c. equals
a. not equal to
vector == 5 returns...
a. 2
b. 2 5
c. FALSE TRUE FALSE FALSE TRUE
c. FALSE TRUE FALSE FALSE TRUE
sum(vector == 5) returns...
a. 2
b. 2 5
c. FALSE TRUE FALSE FALSE TRUE
a. 2
which(vector == 5) returns...
a. 2
b. 2 5
c. FALSE TRUE FALSE FALSE TRUE
b. 2 5
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
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)
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)
c. sum(winesub.region)</p><p>d.summary(winesub.region)
d. summary(wine$sub.region)
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
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
What does this line of code return:
mean(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
percent of households in this large city that are headed by a single woman
a. statistic
b. parameter
c. sample
d. population
b. parameter
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
all households in this large city
a. statistic
b. parameter
c. sample
d. population
d. population
the 200 houses surveyed
a. statistic
b. parameter
c. sample
d. population
c. sample
Gender is a ___________ variable
a. categorical - ordinal
b. quantitative
c. categorical - nominal
c. categorical - nominal
Salary is a _______ variable
a. categorical - ordinal
b. quantitative
c. categorical - nominal
b. quantitative
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
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
If the data is skewed right then mean is ______ median
a. greater than
b. less than
c. equal to
a. greater than
If the data is skewed left then mean is ______ median
a. greater than
b. less than
c. equal to
b. less than
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..)
Which measure of center can be used for a categorical variable?
a. mean
b. median
c. mode
d. IQR
c. mode
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
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
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
To compare two observations from distributions with differnet units you should use the ...
a. coefficient of variation
b. z-score
b. z-score
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
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
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
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
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
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
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
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
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
The coefficient of variation is also know as
a. risk to return
b. return to risk
a. risk to return
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
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...
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
Suppose we define a vector to be the numbers 20, 20, 5, and 10 and call it vec4 as follows:
vec4
a. 1
What does the following code do in R?
mean(dNameshipping[dNameweight=="high"])
a. calculates average shipping for heavy items
b. calculates average weight for high shipping
a. calculates average shipping for heavy items
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
"Highway MPG" is what type of variable?
a. Identifier
b. Quantitative
c. Categorical Ordinal
d. Categorical Nominal
b. Quantitative
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
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
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
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
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.
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
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
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