Submit the following two files to the relevant dropbox on course website. 1. One single pdf...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Submit the following two files to the relevant dropbox on course website. 1. One single pdf file of your report. This file should be named HWx_Last.pdf, where x is the homework number and Last is your last name (e.g., HW1_Lee.pdf). Show your steps, code, and output in your report so that the grader can see your work without actually running your code. You do not need to explain your code line by line, but you should provide enough details so that the grader can understand the flow of your code. 2. One single R file of your code. This file should be named HWx_Last.R, where x and Last are the same as before. This file is to allow the grader to verify your work if necessary. The grader should be able to run your code without modification except (possibly) changing the paths that you use for filenames, etc. In summary, your report should stand alone! • You are not allowed to use any non-Base R package unless otherwise spec- ified. • Do not use R comments to answer a theoretical question. Handwrite or type your answer clearly with appropriate statistical notations. For example, do not write something like . # H1: mu != mu0; # p-value is pnorm (zstar). Instead, handwrite or type • H₁: μμo; . • p-value is P(Z < z*), with all symbols defined clearly. • Problems should appear in the order that they were assigned. . # p-value is pnorm (zstar). Instead, handwrite or type Page 1 1 of 3 • Η: μ # μο; • p-value is P(Z < z*), with all symbols defined clearly. • Problems should appear in the order that they were assigned. • Failing to follow the instructions above may result in a deduction of 50% or more credit. Assignment: 1. Your cell phone bill varies from month to month. Suppose your year has the following monthly amounts ZOOM + 46 33 39 37 46 30 48 32 49 35 30 48 Page 2 of 3 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 spent 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 B. Compute the sample mean and standard deviation of using only the sum () and length() functions. Verify your results using the built-in mean and standard deviation functions. 5. Let x₁, i = 1,..., 5, be the ith element of x = (1, 2, 3, 4, 5!). Compute log x; (i.e., the natural logarithm) and log3.₁. Also, verify the equality log (I-1) = Ei=1 log.x₁. 6. For observations y₁, i = 1,..., n, the arithmetic mean is defined as A = n=¹ [₁1 Yi; the geometric mean is defined as JG = (IT-19); the harmonic mean is defined as 1/n. JH = n(1₁¹)¹. The sample mean of x = (1!, 2!, 3!, 4!, 5!) computed in Problem is in fact the arithmetic mean of x. Here, compute the geometric and harmonic means of r. 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. Print out the new vector. (Hint: You may find the %% operator useful. Explore it using the command ?"%%".) ZOOM + 46 33 39 37 46 30 48 32 49 35 30 48 Page 2 of 3 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 spent 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 B. Compute the sample mean and standard deviation of using only the sum () and length() functions. Verify your results using the built-in mean and standard deviation functions. 5. Let x₁, i = 1,..., 5, be the ith element of x = (1, 2, 3, 4, 5!). Compute log x; (i.e., the natural logarithm) and logg i. Also, verify the equality log (1) = Ei log.x₁. 6. For observations y₁, i = 1,..., n, the arithmetic mean is defined as A = n=¹ [₁1 Yi; the geometric mean is defined as JG = (IT-19); the harmonic mean is defined as 1/n. JH = n(1₁¹)¹. The sample mean of x = (1!, 2!, 3!, 4!, 5!) computed in Problem is in fact the arithmetic mean of x. Here, compute the geometric and harmonic means of r. 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. Print out the new vector. (Hint: You may find the %% operator useful. Explore it using the command ?"%%".) ZOOM + Page < of 3 8. Explore the functions LETTERS () and letters (). Using the paste() function, print out the following. [1] "Dd is the 4th letter of the English alphabet" [2] "Ee is the 5th letter of the English alphabet" [3] "Ff is the 6th letter of the English alphabet" [4] "Gg is the 7th letter of the English alphabet" 2 3 [5] "Hh is the 8th letter of the English alphabet" [6] "Ii is the 9th letter of the English alphabet" [7] "Jj is the 10th letter of the English alphabet" [8] "Kk is the 11th letter of the English alphabet" [9] "L1 is the 12th letter of the English alphabet" [10] "Mm is the 13th letter of the English alphabet" [11] "Nn is the 14th letter of the English alphabet" [12] "Oo is the 15th letter of the English alphabet" [13] "Pp is the 16th letter of the English alphabet" [14] "Qq is the 17th letter of the English alphabet" [15] "Rr is the 18th letter of the English alphabet" [16] "Ss is the 19th letter of the English alphabet" ZOOM + [17] "Tt is the 20th letter of the English alphabet [18] "xx in the 24th letter of the English alphabet [19] "Yy is the 25th letter of the English alphabet (20) "2z in the 26th letter of the English alphabet Submit the following two files to the relevant dropbox on course website. 1. One single pdf file of your report. This file should be named HWx_Last.pdf, where x is the homework number and Last is your last name (e.g., HW1_Lee.pdf). Show your steps, code, and output in your report so that the grader can see your work without actually running your code. You do not need to explain your code line by line, but you should provide enough details so that the grader can understand the flow of your code. 2. One single R file of your code. This file should be named HWx_Last.R, where x and Last are the same as before. This file is to allow the grader to verify your work if necessary. The grader should be able to run your code without modification except (possibly) changing the paths that you use for filenames, etc. In summary, your report should stand alone! • You are not allowed to use any non-Base R package unless otherwise spec- ified. • Do not use R comments to answer a theoretical question. Handwrite or type your answer clearly with appropriate statistical notations. For example, do not write something like . # H1: mu != mu0; # p-value is pnorm (zstar). Instead, handwrite or type • H₁: μμo; . • p-value is P(Z < z*), with all symbols defined clearly. • Problems should appear in the order that they were assigned. . # p-value is pnorm (zstar). Instead, handwrite or type Page 1 1 of 3 • Η: μ # μο; • p-value is P(Z < z*), with all symbols defined clearly. • Problems should appear in the order that they were assigned. • Failing to follow the instructions above may result in a deduction of 50% or more credit. Assignment: 1. Your cell phone bill varies from month to month. Suppose your year has the following monthly amounts ZOOM + 46 33 39 37 46 30 48 32 49 35 30 48 Page 2 of 3 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 spent 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 B. Compute the sample mean and standard deviation of using only the sum () and length() functions. Verify your results using the built-in mean and standard deviation functions. 5. Let x₁, i = 1,..., 5, be the ith element of x = (1, 2, 3, 4, 5!). Compute log x; (i.e., the natural logarithm) and log3.₁. Also, verify the equality log (I-1) = Ei=1 log.x₁. 6. For observations y₁, i = 1,..., n, the arithmetic mean is defined as A = n=¹ [₁1 Yi; the geometric mean is defined as JG = (IT-19); the harmonic mean is defined as 1/n. JH = n(1₁¹)¹. The sample mean of x = (1!, 2!, 3!, 4!, 5!) computed in Problem is in fact the arithmetic mean of x. Here, compute the geometric and harmonic means of r. 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. Print out the new vector. (Hint: You may find the %% operator useful. Explore it using the command ?"%%".) ZOOM + 46 33 39 37 46 30 48 32 49 35 30 48 Page 2 of 3 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 spent 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 B. Compute the sample mean and standard deviation of using only the sum () and length() functions. Verify your results using the built-in mean and standard deviation functions. 5. Let x₁, i = 1,..., 5, be the ith element of x = (1, 2, 3, 4, 5!). Compute log x; (i.e., the natural logarithm) and logg i. Also, verify the equality log (1) = Ei log.x₁. 6. For observations y₁, i = 1,..., n, the arithmetic mean is defined as A = n=¹ [₁1 Yi; the geometric mean is defined as JG = (IT-19); the harmonic mean is defined as 1/n. JH = n(1₁¹)¹. The sample mean of x = (1!, 2!, 3!, 4!, 5!) computed in Problem is in fact the arithmetic mean of x. Here, compute the geometric and harmonic means of r. 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. Print out the new vector. (Hint: You may find the %% operator useful. Explore it using the command ?"%%".) ZOOM + Page < of 3 8. Explore the functions LETTERS () and letters (). Using the paste() function, print out the following. [1] "Dd is the 4th letter of the English alphabet" [2] "Ee is the 5th letter of the English alphabet" [3] "Ff is the 6th letter of the English alphabet" [4] "Gg is the 7th letter of the English alphabet" 2 3 [5] "Hh is the 8th letter of the English alphabet" [6] "Ii is the 9th letter of the English alphabet" [7] "Jj is the 10th letter of the English alphabet" [8] "Kk is the 11th letter of the English alphabet" [9] "L1 is the 12th letter of the English alphabet" [10] "Mm is the 13th letter of the English alphabet" [11] "Nn is the 14th letter of the English alphabet" [12] "Oo is the 15th letter of the English alphabet" [13] "Pp is the 16th letter of the English alphabet" [14] "Qq is the 17th letter of the English alphabet" [15] "Rr is the 18th letter of the English alphabet" [16] "Ss is the 19th letter of the English alphabet" ZOOM + [17] "Tt is the 20th letter of the English alphabet [18] "xx in the 24th letter of the English alphabet [19] "Yy is the 25th letter of the English alphabet (20) "2z in the 26th letter of the English alphabet
Expert Answer:
Answer rating: 100% (QA)
Let 1 true average wear of brandA 2 true average wear of brandB null hy... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
A teapot with a brewer at the top is used to brew tea, as shown in Fig. P3-143. The brewer may partially block the vapor from escaping, causing the pressure in the teapot to rise and an overflow from...
-
List three specific parts of the Case Guide, Objectives and Strategy Section (See below) that you had the most difficulty understanding. Describe your current understanding of these parts. Provide...
-
Case Study: Quick Fix Dental Practice Technology requirements Application must be built using Visual Studio 2019 or Visual Studio 2017, professional or enterprise. The community edition is not...
-
Let x be the number of magazines a person reads every week. Based on a sample survey of adults, the following probability distribution table was prepared. Find the mean and standard deviation of x. 0...
-
Terry traveled to a neighboring state to investigate the purchase of two hardware stores. His expenses included travel, legal, accounting, and miscellaneous expenses. The total was $52,000. He...
-
You are a member of the project team for a new integrated enterprise system for Justin Enterprises. The CEO has acquired a number of different companies over the last few years. This has resulted in...
-
Compare investments with different cash flows and residual values (Learning Objectives 2,4) Locos operates a chain of sandwich shops. The company is considering two possible expansion plans. Plan A...
-
Forrest and Dan make boxes of chocolates for which the demand is uncertain. Forrest says. Thats life. On the other hand, Dan believes that some demand patterns exist that could be useful for planning...
-
Delivery Vehicles On 0 1 March 2 0 1 7 ( commencement date ) , Granny Limited purchased four delivery vehicles in terms of a single lease contract. The fair value of each vehicle was R 4 2 2 5 0 0 on...
-
Record your responses on the spreadsheet template. 2014 February 1 - Brady and Manning decide to start up a partnership. Brady brings in $10 000 cash and equipment costing $60 000, with $17 000 in...
-
Cash Accounts Receivable Supplies 14 Un December 31, Hawkin's records snow the following accounts. $ 7,300 600 4,100 Equipment 14,100 Accounts Payable 7,100 Common stock 12,400 Part 3 of 3 Retained...
-
Bonus 11. Working separately, Zamrik and Kalluri-Bonacuse have developed strain-life models that use the triaxiality and multiaxiality factors. What materials have they used to demonstrate the...
-
The new president of the Blake Company was stumped. Why had profits gone down? He had directed the sales department to push the product with the highest contribution margin, and the sales department...
-
On a 60 degree F day what is the time between thunder and lightning when the storm is directly overhead Use equation Time=d/1.09t/=1050 d is the distance (feet) between the observer a lightening and...
-
Loft Lake Cabinets is approached by Ms. Jenny Zhang, a new customer, to fulfill a large one-time-only special order of 200 units at $190 each for a product similar to one offered to regular...
-
Explain your answers in a. and b: If interest rates don't change, a. Do you expect a zero-coupon bond to experience capital gains or losses each year? b. Same as in a. but for a coupon bond selling...
-
5. A GRAPHING CALCULATOR IS REQUIRED FOR THIS QUESTION. You are permitted to use your calculator to solve an equation, find the derivative of a function at a point, or calculate the value of a...
-
Assessing simultaneous changes in CVP relationships Braun Corporation sells hammocks; variable costs are $75 each, and the hammocks are sold for $125 each. Braun incurs $240,000 of fixed operating...
-
Larry and Lisa Williams, both 33 years old, have been married for 9 years. They live at 638 Arctic Way, Fairbanks, AK 99701. Lisa's Social Security number is 445- 81-1423 and Larry's is 798-09-8526....
-
Quince Interests is a partnership with a tax year that ends September 30, 2012. During that year, Potter, a partner, received $3,000 per month as a guaranteed payment, and his share of partnership...
-
Indicate, in each of the following situations, the number of exemptions the taxpayers are entitled to claim on their 2012 income tax returns. Number of Exemptions a. Donna, a 20-year-old single...
-
The Unilever 2002 annual review stated: Total Shareholder Return (TSR) is a concept used to compare the performance of different companies stocks and shares over time. It combines share price...
-
On the Internet find the 2010 Transparency International Corruption Perception Index and determine the ranking of these countries. a. United States b. Japan c. Chad d. Iceland e. Denmark
-
In the 2010 Wells Report, what was the third most common way of detecting fraud? a. Tips b. Internal audits c. External audits d. By accident e. Reports from the police
Study smarter with the SolutionInn App