tutorbin

r programming homework help

Boost your journey with 24/7 access to skilled experts, offering unmatched r programming homework help

tutorbin

Trusted by 1.1 M+ Happy Students

Recently Asked r programming Questions

Expert help when you need it
  • Q1:Please prepare your submission in a document (Word or PDF) and clearly label all answers and output with their corresponding question number and part.See Answer
  • Q2:Download "llo Lab.zip" from Blackboard, rename it with your name and open (double click) the R project file. You run R script "llo Run.R" that contains all the code you need. The call to the function "Forecast Electric. Demand" in script "Project Functions.R" Calculation for R-squared measure. Plot the results (Note: To Plot type "p" in console) Run or debug "llot Run.R" to see how it works. (download needed packages if necessary) Note that the CSV data does not contain the day and the hour columns. In the function "Forecast Electric.Demand()" these fields are set to 1, thus the fit (r-square) is not good. This information can be extracted from the time stamp. See Answer
  • Q3:Question 1. Consider a population of perennial plants that breed in the early spring and suffer high drought-related mortality late in the summer. Field monitoring experiments suggest that drought leads to a 50% decline in the population during the late summer (d = 0.5). Given this degree of mortality, use the model to calculate how many offspring each individual would, on average, have to produce during the breeding season to prevent the population from declining over time. In other words, calculate the minimum value of b that would be compatible with population growth. Scoring: Full credit for providing the correct answer and showing how the answer was obtained (i.e., show your work). Suppose that you are monitoring island endemic cricket population that has recently become threatened due to an invasive parasitoid wasp species that is attacking its members. From observations of birth and death rates, you estimate that the intrinsic growth rate of the cricket population to be r = -0.05, which has a 95% confidence interval of: 95% C.I. for r = [-0.01, -0.1] Since the entire confidence interval for your estimate of r is negative, your data imply that the population will decline over time.See Answer
  • Q4:Question 2. The current size of the cricket population is 5,000 individuals. Assume that the current conditions of parasitism do not change and, thus, r remains constant over time. Use your point estimate for r = -0.05) and the model presented above to predict the amount of time it will take for the population size to decline below 50 individuals, which is the threshold for a "critically endangered" classification. Show how you arrived at your conclusion. See Answer
  • Q5:Question 3. There is uncertainty around your estimate of r. Suppose that the true value of r is within the 95% confidence interval presented above. Use the model to calculate a best-case scenario and worst-case scenario for the amount of time it will take for the cricket population to become critically endangered. Show how you arrived at your conclusions. See Answer
  • Q6:Part 1: Create an R script that computes the measures of central tendency and measures of variability and the relationships for each of the seven variables in the attitude dataset. Use the functions: var( ) sd() and cor() 3 mean, median, mode, max, min, range, quantile, IQR, Check your work by using the summary and/or describe functions.See Answer
  • Q7:Part 2: Produce at least one scatter plot, one histogram, and one box-and-whisker plot (Box plot) for each variable.See Answer
  • Q8:Part 3: Create a matrix of scatter plots, a matrix of histograms, and a matrix of boxplots. Complete this as a R Markdown, document what you are doing using comments, and upload.See Answer
  • Q9:Problem 6.3.1 Use "ChickWeight" dataset and ggplot to draw box plots for weight for both the diets.See Answer
  • Q10:Problem 6.3.2 Use "PimaIndians Diabetes2" dataset and ggplot to draw histograms for "pressure". One histogram with counts and one histogram with density.See Answer
  • Q11:Equipment Precision Comparison Suppose you are trying to make a difficult measurement. Fortunately there is commercial equipment available for this purpose, although it is expensive. Your company has a large budget and wants to obtain the best equipment, but it also does not want to waste money needlessly. You are responsible for performing some tests to guide their decision. You have ordered two trial samples of metering equipment to test which one is better: Equipment A (which costs £60,000) and Equipment B (which costs £30,000). You take 10 measurements using each in a controlled environment. Equipment A gives the following readings: 128.00, 125.04, 125.17, 128.62, 126.06, 124.54, 128.80, 129.98, 126.49, 127.16 Equipment B gives: 122.16, 127.35, 124.73, 129.51, 123.60, 132.67, 131.07, 126.20, 132.44, 126.91 You may assume that measurement errors are normally distributed. 1. The "correct" value for the measurement is supposed to be 127. Verify that both tools are properly "calibrated" (i.e., that they provide measurements that on average are consistent with this value) with an appropriate statistical test. 2. Suppose you did not know that the true value was 127, or there was a possibility that the true value was not 127. Use a statistical test to evaluate whether the two tools produce measurements that are, on average, consistent with each other. 3. Company specifications require that the calibration accuracy (the absolute difference between the average of a very large number of measurements and the "correct" value) of the tool must be better (less) than 5. Show that both tools meet this requirement to better than 99% confidence under the assumptions above. 4. The most important consideration in your decision is precision: you want the tool that produces measurements with the least variance (lowest standard deviation). Can you tell (using an appropriate statistical test) if one tool is significantly more precise than the other? If so, which tool? Quote a p-value, and use a confidence interval to quantify how much more precise one tool is (or isn't) than the other. 5. Tool A is much more expensive, and your company might not want to spend the extra money if it cannot shown to be clearly superior. Conduct a modified version of the above hypothesis test with this information in mind, and quote a new p-value. 6. Would you recommend purchasing tool A, tool B, or would you run more tests (at a cost of £5,000 in overheads plus £500 per test)? If you run more tests, how many more tests would you run? Explain the basis for your decision in a few sentences or less.See Answer
  • Q12:A researcher has a set of numbers whose mean is equal to 4.9. The researcher wants to know if that set of numbers likely comes from the uniform distribution on the interval of 1 to 10 using the equation method. a. Determine the theoretical expected value for the uniform distribution on the interval of 1 to 10. b. With reference to the lecture slides, create the distribution of means from 99 random simulated draws from the uniform distribution on the interval from 1 to 10. c. Plot the histogram (function hist()) of the simulated distribution of means and place a vertical line on that plot at the location of the researcher's mean (abline(v=4.9)) and another line showing the theoretically expected value. D Determine the probability that the researcher's mean comes distribution (the monte-carlo p-value). e. Explain your conclusion.See Answer
  • Q13:A researcher has a set of numbers whose mean is equal to 13.8. The researcher wants to know if that set of numbers likely comes from the uniform distribution on the interval of 1 to 16. a. Determine the theoretical expected value for the uniform distribution on the interval of 1 to 16 using the equation method. b. With reference to the lecture slides, create the distribution of means from 99 random simulated draws from the uniform distribution on the interval from 1 to 16. C. Plot the histogram (function hist()) of the simulated distribution of means and place a vertical line on that plot at the location of the researcher's mean (abline(v=13.8)) and another line showing the theoretically expected value. d. Determine the probability that the researcher's mean comes from that distribution (the monte-carlo p-value). e. Explain your conclusion.See Answer
  • Q14:a. With reference to the lecture slides (Lecture 4), determine the mean center and standard distance for each of the above points datasets. b. Create a plot showing the events for each dataset as well as the location of the mean center and standard distance overlaid on that plot. NOTE: see "symbols()" for plotting the standard distance and in particular the argument "inches" for that function and see "points" for plotting the centroid.See Answer
  • Q15:With reference to the lecture slides (Lecture 4 & 5), determine the average nearest neighbor distance for each of the datasets in (3).See Answer
  • Q16:With reference to the lecture slides (Lecture 5), determine the theoretically expected value of nearest neighbor distance for each of the datasets in (3).See Answer
  • Q17:With reference to the lecture slides (Lecture 5), create the distribution of average nearest neighbor distances from 99 random simulated draws within each of the respective datasets' polygons from (3). a. Plot the histogram (function hist()) of the simulated distribution of means and place a vertical line on that plot at the location of the observed nearest neighbor distance from (4) as a vertical line and another line showing the theoretically expected value from (5). b. Determine the probability that the observed nearest neighbor mean comes from that distribution (the monte-carlo p-value). C. Explain your conclusion. See Answer
  • Q18:1. Shipments of Household Appliances: Line Graphs. The file ApplianceShipments.csv contains the series of quarterly shipments (in millions of dollars) of US household appliances between 1985 and 1989. a. Create a well-formatted time plot of the data using the ggplot2 package. Add a smoothed line to the graph. For a closer view of the patterns, zoom in to the range of 3500-5000 on the y- axis. Hint: in order to convert Quarter into a date format, use the zoo library's as.Date utility: as.Date (as. yearqtr (appship.df$Quarter,format="Q%q-%Y")). b. Does there appear to be a quarterly pattern? c. Using ggplot2 in R, create one chart with four separate lines, one line for each of Q1, Q2, Q3, and Q4. In R, this can be achieved by generating a data.frame for each quarter Q1, Q2, Q3, Q4 (use seq(1,20,4), seq (2,20,4), etc. to create indexes for different quarters), and then plotting them as separate series on the line graph. Does there appear to be a difference between quarters? Hint: For ggplot() to display the legend, the color aesthetics must be included inside the aes() specification. d. Using ggplot2, create a chart with one line of average shipments in each quarter. Hint: Use the quarter () command of the lubridate package to create a new column in the shipments data frame and use tapply to average shipments across quarters. e. Using ggplot2, create a line graph of the series at a yearly aggregated level (i.e., the total shipments in each year) and comment on what happened to shipments over years. Hint: Use the year() function of the lubridate package to extract the years the shipments data frame.See Answer
  • Q19:2. Sales of Riding Mowers: Scatter Plots. A company that manufactures riding mowers wants to identify the best sales prospects for an intensive sales campaign. In particular, the manufacturer is interested in classifying households as prospective owners or nonowners on the basis of Income (in $1000s) and Lot Size (in 1000 ft2). The marketing expert looked at a random sample of 24 households, given in the file Riding Mowers.csv. a. Using ggplot() in R, create a scatter plot of Lot Size vs. Income, color-coded by the outcome variable owner/nonowner. Make sure to obtain a well-formatted plot (create legible labels and a legend, etc.). 3. Laptop Sales at a London Computer Chain: Bar Charts and Boxplots. The file LaptopSales- January 2008.csv contains data for all sales of laptops at a computer chain in London in January 2008. This is a subset of the full dataset that includes data for the entire year. a. Using ggplot() in R, create a histogram and density plot of the average retail price. Overlay the histogram and density plot by a normal density plot. Does the price data look normally distributed? b. Create a Q-Q plot of the price data. Does the Q-Q plot confirm your finding (in part a.) about the normality of the data? Are there any outliers? c. Create a bar chart, showing the average retail price by store postcode (StorePostcode). Which store postcode has the highest average retail price? Which has the lowest? Hint: For better readability, feel free to rotate the x axis labels. You can do it by adding the following statement to the ggplot() statement: +theme (axis.text.x = element_text (angle = 90)). Also, in order to zoom in closer to the price limit, add the following statement to the ggplot () call: + coord_cartesian (ylim-c (480, 500)). d. Using the filter() function of the dplyr package, reduce your laptop data frame to only these two store postcodes. Using ggplot2, create a side-by-side violin plot of retail prices of the two stores. Be sure to jitter the markers for better visibility. Does there seem to be a huge difference between their prices? e. To better compare retail prices across post codes, create side-by-side boxplots of retail prices of the two postcodes and compare the price distribution in the two postcodes. Does there seem to be a difference between their price distributions? f. Suppose you are interested in what specific technical features greatly impact computer prices. Using the cut() function of the base package, create a new categorical variable in your main laptop sales data frame that contains 3 RetailPrice categories: "low", "medium", and "high." Call the variable PriceCat and make sure that its class is factor. Subsequently, create another data frame that contains this PriceCat variable and all the columns that describe laptop features (such as BatteryLife_Hrs, ScreenSize In, etc.). Finally, create a box-plot enhanced parallel coordinate plot with all the features on the horizontal axis and PriceCat on the vertical axis. Which feature(s) seem to be the most important determinants of PriceCat?See Answer
  • Q20:Instructions You may use web searches, but not interactive methods such as asking others online or in person. In questions with code blocks, full credit will reserved for effective use of R to reach a correct solution. Questions 1. An team has 8 members. Denote them by {1,2,3,4,5,6,7,8}. Construct a reasonable, standard model for selecting a team member in such a way that any member is equally likely to be selected, recording the member selected, and repeating this process one more time using the remaining set of seven team members. Thus outcomes will be pairs of values (a, b) with a, b € {1,2,3,4,5,6,7,8} and a ‡ b. You don't have to explain the model, just provide the values requested below. What is the probability of the outcome (5,3)? (5 points) What is the probability of the event {(a, b)|a < b}? (5 points)See Answer

TutorBin Testimonials

I got my R Programming homework done on time. My assignment is proofread and edited by professionals. Got zero plagiarism as experts developed my assignment from scratch. Feel relieved and super excited.

Joey Dip

I found TutorBin R Programming homework help when I was struggling with complex concepts. Experts provided step-wise explanations and examples to help me understand concepts clearly.

Rick Jordon

TutorBin experts resolve your doubts without making you wait for long. Their experts are responsive & available 24/7 whenever you need R Programming subject guidance.

Andrea Jacobs

I trust TutorBin for assisting me in completing R Programming assignments with quality and 100% accuracy. Experts are polite, listen to my problems, and have extensive experience in their domain.

Lilian King

I got my R Programming homework done on time. My assignment is proofread and edited by professionals. Got zero plagiarism as experts developed my assignment from scratch. Feel relieved and super excited.

Joey Dip

I found TutorBin R Programming homework help when I was struggling with complex concepts. Experts provided step-wise explanations and examples to help me understand concepts clearly.

Rick Jordon

Popular Subjects for r programming

You can get the best rated step-by-step problem explanations from 65000+ expert tutors by ordering TutorBin r programming homework help.

TutorBin helping students around the globe

TutorBin believes that distance should never be a barrier to learning. Over 500000+ orders and 100000+ happy customers explain TutorBin has become the name that keeps learning fun in the UK, USA, Canada, Australia, Singapore, and UAE.