[Solved] STAT823 Homework 4-Dynamic Report

$25

File Name: STAT823_Homework_4_Dynamic_Report.zip
File Size: 310.86 KB

SKU: [Solved] STAT823 Homework 4-Dynamic Report Category: Tag:
5/5 - (1 vote)
  1. A total of 30 Masters students in a Statistics course were asked to state how long they take to finish their weekly homework.

The following is the reported time in hours:

2,3,1.5,3.5,4,3,1,3,2,3.5,4,3,2.5,2.5,2,2,1.5,2,2,3,3,

3,1,1,1,1.5,2,2.5,2.5,3

(a) Write your own R code (function) to calculate the sample mean without using the mean() R function then confirm

your answer using the mean() function

1 Xn

x = xi n i=1

(b) Write your own R code (function) to calculate the sample variance without using the sd() and var() R functions. You can use the mean() and sum() functions, then confirm your answer using the var() function

1 n

2 X 2 2

s = xi nx n 1 i=1

  1. Caleb wishes to take P = $10,000 loan from a bank. The bank offers the loan at a monthly interest rate r = 3% for a period of n = 24 months. Calculate the monthly instalments m that Caleb will have to remit to the bank given that the principal is calculated as

1 (1 + r)n

P = m

r

(Hint: First, make m the subject of the formula. That is, re-write the expression to obtain m = (.) then solve for m)

r

m = P

1 (1 + r)n

Proof: Not reqired2 1 Xn 2S = (xi x) n 1 i=11 Xn 2 2 = (xi 2xix + x ) n 1 i=11 Xn 2 Xn 2= xi 2x xi + nx n 1 i=1 i=1Notice that = 1 Xn Xi Xn Xi = nXX n i=1 i=11 n S2 = X x n 1 i=11 Xn = x n 1 i=1= n 1 i=1

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] STAT823 Homework 4-Dynamic Report[Solved] STAT823 Homework 4-Dynamic Report
$25