Home /
Expert Answers /
Computer Science /
can-anyone-solve-this-whole-problem-using-r-studio-a-write-a-function-with-input-n-and-d-and-ou-pa920
(Solved): Can anyone solve this whole problem? Using R studio. (a) Write a function with input n and d and ou ...
Can anyone solve this whole problem? Using R studio.
(a) Write a function with input n and d and output n IID random vector uniformly distributed within d-dimensional unit ball (with radius 1 ). (b) For two random vectors in 3D unit ball, what is the expected distance between them? Do not calculate it theoretically. Do a simulation to estimate the expected distance. (c) Let ?d? be the ratio between the volume of a unit ball and the volume of a cube with side 2 , in Rd. Estimate ?d? for d=2,…,5. (d) Search online and find the exact values of ?d?. Compare it with your estimate.