Question: The Stirling function stirling is given as an approximation of n!. The R function factorial is also an approximation for the factorial operation. This means

The Stirling function stirling is given as an approximation of n!. The R function factorial is also an approximation for the factorial operation. This means that prod(1:n) will not always be the same as Πn j=1 j. Find out the least n for which factorial does not agree with the result for prod(1:n). Also, for 1:n, plot the n! values using the prod, stirling and factorial functions against 1:n and make notes.

Step by Step Solution

3.40 Rating (162 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The least n for which factorial does not agree with ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related A Course In Statistics With R Questions!