STA 3100– Using R for Introductory Statistics Homework Assignment

Download Solution Order New Solution

Assignment Task

1. Your cell phone bill varies from month to month. Suppose your year has the following monthly amounts

                                          46 33 39 37 46 30 48 32 49 35 30 48

Explore the function scan() and use it to read the data. How much did you spend this year on the cell phone? What is the smallest amount you spend in a month? What is the largest? How many months was the amount greater than 40? What percentage was this? Answer all questions using R.

2. Using the rep() function once, create a vector of four 2s, then three 3s, then two 5s. Next, using the rep() and seq() functions, create a vector where each of (1, 3, 5, 7, 9) is replaced by two repeats of itself. First do this with the argument each, then with the argument times.

3. For a nonnegative integer k, k! can be computed using the command factorial(k). Using the function factorial() once, print out the vector (1! 2! 3! 4! 5!). Do this again using the function cumprod().

4. Let x = (1!, 2!, 3!, 4!, 5!) from Problem 3. Compute the sample mean and standard deviation of x using only the sum() and length() functions. Verify your results using the built-in mean and standard deviation functions.

5. Let xi , i = 1, . . . , 5, be the ith element of x = (1!, 2!, 3!, 4!, 5!). Compute log xi (i.e., the natural logarithm) and log3 xi. Also, verify the equality log (∏5i = 1 xi) = Σ5i=1 log xi.

6. For observations yi, i = 1, . . . , n, the arithmetic mean is defined as the geometric mean is defined y¯A= n-1 Σ5i=1 yi; as y¯G = (∏n i=1 yi)1/n; the harmonic mean is defined as y¯H = n (Σni=1 yi -1)-1. The sample mean of x = (1!, 2!, 3!, 4!, 5!) computed in Problem 4 is the arithmetic mean of x. Here, compute the geometric and harmonic means of x. Verify your results using the functions geometric. mean() and harmonic. mean() in the package psych. Is there an equality/inequality relating the three means

7. Assign the vector (2, 8, 3, 7, 4, 1, 9) to an object. Using one single command, find the elements of the vector that are even or greater than 7, multiply those elements by −1, and use them to replace the original elements.

This Statistics has been solved by our PhD Experts at My Uni Paper.  Our Assignment Writing Experts are efficient in providing a fresh solution to this question. We are serving more than 10000+ Students in Australia, the UK, and the US by helping them to score HD in their academics. Our Experts are well-trained to follow all marking rubrics and referencing styles.

Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.

Get It Done! Today

Country
Applicable Time Zone is AEST [Sydney, NSW] (GMT+11)
+

Every Assignment. Every Solution. Instantly. Deadline Ahead? Grab Your Sample Now.