The Stirling function stirling is given as an approximation of n!. The R function factorial is also
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 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.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
A Course In Statistics With R
ISBN: 9781119152729
1st Edition
Authors: Prabhanjan N. Tattar, Suresh Ramaiah, B. G. Manjunath
Question Posted: