STATS 306
statistics代写 1.True or false: if typeof(x) is “integer”, then is.finite(x) equals !is.infinite(x).2.I want to join weather data
Practice Questions statistics代写
- True or false: if typeof(x) is “integer”, then finite(x) equals!is.infinite(x).
- Iwant to join weather data for the specific hour and departure airport corresponding to each flight in the flights
a.Abouthow many rows should the resulting table have?
b.SupposeI use the following command to perform this merge:
left_join(flights, weather, by=c(“origin”, “hour”))
Approximately how many rows will the resulting table have?statistics代写
c.Explainwhat went wrong, and provide the correct command needed to perform the
3.Thefollowing plot was created from the gss_cat data set and compares the number of survey respondents who were married versus all other categories:
Explain why this figure is misleading, and supply code to produce a less deceiving plot.
- Thefollowing command loads the complete text of Shakespeare’s Hamlet into a vector called hamlet:
hamlet = readr::read_lines(“https://git.io/vpeOg”)statistics代写
Each vector entry represents one line. Character names are in ALL CAPS: “HAMLET”, “HORATIO”, etc. In this problem, a word is defined as a consecutive string of letters, dashes and/or apostrophes (‘).
a.Whatare the longest word(s) used in Hamlet?
b.Whatis the most common contraction (word containing an apostrophe)?
c.Except for character names (HAMLET, HORATIO, ), what is the most frequently used word in the playthat is six or more characters long?statistics代写
d.A paragraph of spoken dialogue begins with the character’s name (in all caps), followed by a tab (\t), followed by one or more lines of text.1 The character with the most paragraphs of dialogue is,of course, Hamlet, with Which character has the second-most paragraphs of dialogue, and how many does (s)he have?statistics代写
5.The fivethirtyeight package contains data sets from the eponymous web site.
The data frame fivethirtyeight::murder_2015_finalcontains data on the murder rate in major US cities in 2014 and 2015.
a.Loadthis data and convert it to tidy
b.Converteach city and state pair to a label featuring the abbreviated state For example, the row for “Baltimore” and “Maryland” should become “Baltimore, MD”. Hint: State names and abbreviations come pre-loaded into base R.
c.Usethe data to recreate the following plot:
- Thepolynomial statistics代写
x4 − 16x3 − 32x2 − 64x − 144
has a unique positive root. What is it? (Hint: if r is a root of p, i.e. p(r) = 0, then r is a minimum of the function p(x)2.)
- A natural number greater than 1 is prime if it is only evenly divisible by itself and 1. Of the first thousand natural numbers, how many areprime?statistics代写
1This ignores some other elements of the text such as the dramatis personae. For the purposes of the exercise just match paragraphs as they are defined.
8.Consider the following dataset:
n = 1000
df = tibble(x = runif(n, -1, 1), y = 4 * (x^2 – 1/2)^2 + runif(n, -1, 1) / 3)
a.Computethe linear regression of y on x. Based on the regression results, is x a good predictor of y?
b.Producea scatter plot of x and y. Based on the plot, is x and good predictor of y?
c.Finda better model for predicting y from x, fit it, and provide a numerical measure of how much better this model is at prediction than the model you fit in part a).
9.Recall that forcats::gss_catcontains data from the General Social
a.Whatis the median reported age for Jewish respondents?statistics代写
b.Amillennial is defined to be someone who was 18 or younger in the year Are the millennials inthis survey more likely to identify as atheist (relig == ‘None’) compared to earlier generations?
c.Considerthefollowing two possible models relating age and hours spent watching TV:
lm(age ~ tvhours)statistics代写
lm(log(age) ~ log(1 + tvhours))
In your opinion, which model is a better fit to the data and why?
d.Isthere a statistically significant difference in the fraction of white respondents who identified as Christian, compared to non-white respondents? What is the p-value? (Define “Christian” to mean any of the following responses: “Christian”, “Orthodox-christian”, “Catholic”, “Protestant”.)statistics代写
- Thefollowing questions refer to the dplyr::storms data This data set contains tracking informationon tropical storms and hurricanes in the United States over the past 40 years.
a.Each storm is given a name which is unique for that year.Names can be re-used in later years.For example,there has been a storm named Ana in 1979, 1985, 1991, 1997, 2003, 2009 and One other storm name has been used seven times. What is it?statistics代写
b.Mostof the observations in storms are tropical depressions or tropical How many storms became category 2 or higher hurricanes at some point?
c.Reproduce the following plot showing the number of category 2 or higher hurricanes in eachyear:
d.Is the slope of the regression line in the preceding plot significantly different from zero? What does thisimply?
e.In 1985 a hurricane made landfall on Long Island, NY near JFK Airport. What was the name of thathurricane?
更多其他:C++代写 考试助攻 C语言代写 finance代写 计算机代写 report代写 project代写 物理代写 数学代写 经济代写 java代写 python代写 程序代写 金融经济统计代写