Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 143
3 votes

Expected absolute value of the average of two points from the disc

In R, I can simulate a million pairs of points in the unit disc: n = 10^6 k = 2 theta = matrix(runif(k*n, 0, 2*pi), nrow = n) r = sqrt(matrix(runif(k*n, 0, 1), nrow = n)) x = cos(theta)*r; y = sin(the …
Michael Lugo's user avatar
12 votes

How to generate random points in $\ell_p$ balls?

I'll assume that you're looking for a uniformly chosen random point in the ball, since you didn't state otherwise. For p=1, you're asking for a uniform random point in the cross polytope in n dimen …
Michael Lugo's user avatar