Skip to main content
added 1 character in body; edited tags
Source Link

I would like to derive the PDF for an ''annulus'' type distribution, defined by the parameters $\theta\sim U(0,2 \pi)$ and $d\sim N(0,\sigma)$; where $\theta$ is the angle round a circle of radius $r$, and $d$ is the deviation normal to the circle's perimeter.

I can generate sample points easy enough, by the following:

fTorusProjector[xCentre_, yCentre_, θ_, d_] := {xCentre + d Sin[θ], yCentre + d Cos[θ]} fTorusRand[r_, σ_] := Module[{θ = RandomReal[{0, 2 Pi}], d = RandomVariate[NormalDistribution[0, σ], {1}][[1]]}, fTorusProjector[r Sin[θ], r Cos[θ], θ, d]] ListPlot[Table[fTorusRand[5, 0.5], {i, 1, 10000}]] 

Which results in a plot similar to the one below: enter image description here

My question is, is there a way to derive an analytic form for the PDF of this distribution? I can't help thinking that there's probably a way I'm missing, but am not sure how to proceed here.

Even an approximate PDF / one that mimics the above behaviour would suffice.

Edit: I have tried using the following to get MathematicaMathematica to approximate a PDF of the above sample:

 empD = EmpiricalDistribution[data]; 

However, when I try to draw this using:

ContourPlot[PDF[empD, {x, y}], {x, -7, 7}, {y, -7, 7}] 

I just get a blank plot.

Edit 2: Since $\theta$ and $d$ are independent, I can derive the joint PDF in these coordinates:

$p(\theta,d) = \frac{1}{2\pi} \times \frac{1}{2\pi} exp(-d^2/2\sigma^2)$$p(\theta,d) = \frac{1}{2\pi} \times \frac{1}{2\pi} \exp(-d^2/2\sigma^2)$

I suppose I can then use Jacobians to transform back into the $(x,y)$ frame, although am not sure how to do this?

Best,

Ben

I would like to derive the PDF for an ''annulus'' type distribution, defined by the parameters $\theta\sim U(0,2 \pi)$ and $d\sim N(0,\sigma)$; where $\theta$ is the angle round a circle of radius $r$, and $d$ is the deviation normal to the circle's perimeter.

I can generate sample points easy enough, by the following:

fTorusProjector[xCentre_, yCentre_, θ_, d_] := {xCentre + d Sin[θ], yCentre + d Cos[θ]} fTorusRand[r_, σ_] := Module[{θ = RandomReal[{0, 2 Pi}], d = RandomVariate[NormalDistribution[0, σ], {1}][[1]]}, fTorusProjector[r Sin[θ], r Cos[θ], θ, d]] ListPlot[Table[fTorusRand[5, 0.5], {i, 1, 10000}]] 

Which results in a plot similar to the one below: enter image description here

My question is, is there a way to derive an analytic form for the PDF of this distribution? I can't help thinking that there's probably a way I'm missing, but am not sure how to proceed here.

Even an approximate PDF / one that mimics the above behaviour would suffice.

Edit: I have tried using the following to get Mathematica to approximate a PDF of the above sample:

 empD = EmpiricalDistribution[data]; 

However, when I try to draw this using:

ContourPlot[PDF[empD, {x, y}], {x, -7, 7}, {y, -7, 7}] 

I just get a blank plot.

Edit 2: Since $\theta$ and $d$ are independent, I can derive the joint PDF in these coordinates:

$p(\theta,d) = \frac{1}{2\pi} \times \frac{1}{2\pi} exp(-d^2/2\sigma^2)$

I suppose I can then use Jacobians to transform back into the $(x,y)$ frame, although am not sure how to do this?

Best,

Ben

I would like to derive the PDF for an ''annulus'' type distribution, defined by the parameters $\theta\sim U(0,2 \pi)$ and $d\sim N(0,\sigma)$; where $\theta$ is the angle round a circle of radius $r$, and $d$ is the deviation normal to the circle's perimeter.

I can generate sample points easy enough, by the following:

fTorusProjector[xCentre_, yCentre_, θ_, d_] := {xCentre + d Sin[θ], yCentre + d Cos[θ]} fTorusRand[r_, σ_] := Module[{θ = RandomReal[{0, 2 Pi}], d = RandomVariate[NormalDistribution[0, σ], {1}][[1]]}, fTorusProjector[r Sin[θ], r Cos[θ], θ, d]] ListPlot[Table[fTorusRand[5, 0.5], {i, 1, 10000}]] 

Which results in a plot similar to the one below: enter image description here

My question is, is there a way to derive an analytic form for the PDF of this distribution? I can't help thinking that there's probably a way I'm missing, but am not sure how to proceed here.

Even an approximate PDF / one that mimics the above behaviour would suffice.

Edit: I have tried using the following to get Mathematica to approximate a PDF of the above sample:

 empD = EmpiricalDistribution[data]; 

However, when I try to draw this using:

ContourPlot[PDF[empD, {x, y}], {x, -7, 7}, {y, -7, 7}] 

I just get a blank plot.

Edit 2: Since $\theta$ and $d$ are independent, I can derive the joint PDF in these coordinates:

$p(\theta,d) = \frac{1}{2\pi} \times \frac{1}{2\pi} \exp(-d^2/2\sigma^2)$

I suppose I can then use Jacobians to transform back into the $(x,y)$ frame, although am not sure how to do this?

Best,

Ben

deleted 63 characters in body
Source Link
Bob Hanlon
  • 167.4k
  • 7
  • 83
  • 213

I would like to derive the PDF for an ''annulus'' type distribution, defined by the parameters $\theta\sim U(0,2 \pi)$ and $d\sim N(0,\sigma)$; where $\theta$ is the angle round a circle of radius $r$, and $d$ is the deviation normal to the circle's perimeter.

I can generate sample points easy enough, by the following:

fTorusProjector[xCentre_, yCentre_, \[Theta]_θ_, d_] := {xCentre + d Sin[\[Theta]]Sin[θ], yCentre + d Cos[\[Theta]]Cos[θ]} fTorusRand[r_, \[Sigma]_]σ_] := Module[{\[Theta]θ = RandomReal[{0, 2 Pi}], d = RandomVariate[NormalDistribution[0, \[Sigma]]σ], {1}][[1]]}, fTorusProjector[r Sin[\[Theta]]Sin[θ], r Cos[\[Theta]]Cos[θ], \[Theta]θ, d]] ListPlot[Table[fTorusRand[5, 0.5], {i, 1, 10000}]] 

Which results in a plot similar to the one below: enter image description here

My question is, is there a way to derive an analytic form for the PDF of this distribution? I can't help thinking that there's probably a way I'm missing, but am not sure how to proceed here.

Even an approximate PDF / one that mimics the above behaviour would suffice.

Edit: I have tried using the following to get Mathematica to approximate a PDF of the above sample:

 empD = EmpiricalDistribution[data]; 

However, when I try to draw this using:

ContourPlot[PDF[empD, {x, y}], {x, -7, 7}, {y, -7, 7}] 

I just get a blank plot.

Edit 2: Since $\theta$ and $d$ are independent, I can derive the joint PDF in these coordinates:

$p(\theta,d) = \frac{1}{2\pi} \times \frac{1}{2\pi} exp(-d^2/2\sigma^2)$

I suppose I can then use Jacobians to transform back into the $(x,y)$ frame, although am not sure how to do this?

Best,

Ben

I would like to derive the PDF for an ''annulus'' type distribution, defined by the parameters $\theta\sim U(0,2 \pi)$ and $d\sim N(0,\sigma)$; where $\theta$ is the angle round a circle of radius $r$, and $d$ is the deviation normal to the circle's perimeter.

I can generate sample points easy enough, by the following:

fTorusProjector[xCentre_, yCentre_, \[Theta]_, d_] := {xCentre + d Sin[\[Theta]], yCentre + d Cos[\[Theta]]} fTorusRand[r_, \[Sigma]_] := Module[{\[Theta] = RandomReal[{0, 2 Pi}], d = RandomVariate[NormalDistribution[0, \[Sigma]], {1}][[1]]}, fTorusProjector[r Sin[\[Theta]], r Cos[\[Theta]], \[Theta], d]] ListPlot[Table[fTorusRand[5, 0.5], {i, 1, 10000}]] 

Which results in a plot similar to the one below: enter image description here

My question is, is there a way to derive an analytic form for the PDF of this distribution? I can't help thinking that there's probably a way I'm missing, but am not sure how to proceed here.

Even an approximate PDF / one that mimics the above behaviour would suffice.

Edit: I have tried using the following to get Mathematica to approximate a PDF of the above sample:

 empD = EmpiricalDistribution[data]; 

However, when I try to draw this using:

ContourPlot[PDF[empD, {x, y}], {x, -7, 7}, {y, -7, 7}] 

I just get a blank plot.

Edit 2: Since $\theta$ and $d$ are independent, I can derive the joint PDF in these coordinates:

$p(\theta,d) = \frac{1}{2\pi} \times \frac{1}{2\pi} exp(-d^2/2\sigma^2)$

I suppose I can then use Jacobians to transform back into the $(x,y)$ frame, although am not sure how to do this?

Best,

Ben

I would like to derive the PDF for an ''annulus'' type distribution, defined by the parameters $\theta\sim U(0,2 \pi)$ and $d\sim N(0,\sigma)$; where $\theta$ is the angle round a circle of radius $r$, and $d$ is the deviation normal to the circle's perimeter.

I can generate sample points easy enough, by the following:

fTorusProjector[xCentre_, yCentre_, θ_, d_] := {xCentre + d Sin[θ], yCentre + d Cos[θ]} fTorusRand[r_, σ_] := Module[{θ = RandomReal[{0, 2 Pi}], d = RandomVariate[NormalDistribution[0, σ], {1}][[1]]}, fTorusProjector[r Sin[θ], r Cos[θ], θ, d]] ListPlot[Table[fTorusRand[5, 0.5], {i, 1, 10000}]] 

Which results in a plot similar to the one below: enter image description here

My question is, is there a way to derive an analytic form for the PDF of this distribution? I can't help thinking that there's probably a way I'm missing, but am not sure how to proceed here.

Even an approximate PDF / one that mimics the above behaviour would suffice.

Edit: I have tried using the following to get Mathematica to approximate a PDF of the above sample:

 empD = EmpiricalDistribution[data]; 

However, when I try to draw this using:

ContourPlot[PDF[empD, {x, y}], {x, -7, 7}, {y, -7, 7}] 

I just get a blank plot.

Edit 2: Since $\theta$ and $d$ are independent, I can derive the joint PDF in these coordinates:

$p(\theta,d) = \frac{1}{2\pi} \times \frac{1}{2\pi} exp(-d^2/2\sigma^2)$

I suppose I can then use Jacobians to transform back into the $(x,y)$ frame, although am not sure how to do this?

Best,

Ben

Tweeted twitter.com/StackMma/status/726244591842779136
added 293 characters in body
Source Link
ben18785
  • 3.2k
  • 17
  • 31

I would like to derive the PDF for an ''annulus'' type distribution, defined by the parameters $\theta\sim U(0,2 \pi)$ and $d\sim N(0,\sigma)$; where $\theta$ is the angle round a circle of radius $r$, and $d$ is the deviation normal to the circle's perimeter.

I can generate sample points easy enough, by the following:

fTorusProjector[xCentre_, yCentre_, \[Theta]_, d_] := {xCentre + d Sin[\[Theta]], yCentre + d Cos[\[Theta]]} fTorusRand[r_, \[Sigma]_] := Module[{\[Theta] = RandomReal[{0, 2 Pi}], d = RandomVariate[NormalDistribution[0, \[Sigma]], {1}][[1]]}, fTorusProjector[r Sin[\[Theta]], r Cos[\[Theta]], \[Theta], d]] ListPlot[Table[fTorusRand[5, 0.5], {i, 1, 10000}]] 

Which results in a plot similar to the one below: enter image description here

My question is, is there a way to derive an analytic form for the PDF of this distribution? I can't help thinking that there's probably a way I'm missing, but am not sure how to proceed here.

Even an approximate PDF / one that mimics the above behaviour would suffice.

Edit: I have tried using the following to get Mathematica to approximate a PDF of the above sample:

 empD = EmpiricalDistribution[data]; 

However, when I try to draw this using:

ContourPlot[PDF[empD, {x, y}], {x, -7, 7}, {y, -7, 7}] 

I just get a blank plot.

Edit 2: Since $\theta$ and $d$ are independent, I can derive the joint PDF in these coordinates:

$p(\theta,d) = \frac{1}{2\pi} \times \frac{1}{2\pi} exp(-d^2/2\sigma^2)$

I suppose I can then use Jacobians to transform back into the $(x,y)$ frame, although am not sure how to do this?

Best,

Ben

I would like to derive the PDF for an ''annulus'' type distribution, defined by the parameters $\theta\sim U(0,2 \pi)$ and $d\sim N(0,\sigma)$; where $\theta$ is the angle round a circle of radius $r$, and $d$ is the deviation normal to the circle's perimeter.

I can generate sample points easy enough, by the following:

fTorusProjector[xCentre_, yCentre_, \[Theta]_, d_] := {xCentre + d Sin[\[Theta]], yCentre + d Cos[\[Theta]]} fTorusRand[r_, \[Sigma]_] := Module[{\[Theta] = RandomReal[{0, 2 Pi}], d = RandomVariate[NormalDistribution[0, \[Sigma]], {1}][[1]]}, fTorusProjector[r Sin[\[Theta]], r Cos[\[Theta]], \[Theta], d]] ListPlot[Table[fTorusRand[5, 0.5], {i, 1, 10000}]] 

Which results in a plot similar to the one below: enter image description here

My question is, is there a way to derive an analytic form for the PDF of this distribution? I can't help thinking that there's probably a way I'm missing, but am not sure how to proceed here.

Even an approximate PDF / one that mimics the above behaviour would suffice.

Edit: I have tried using the following to get Mathematica to approximate a PDF of the above sample:

 empD = EmpiricalDistribution[data]; 

However, when I try to draw this using:

ContourPlot[PDF[empD, {x, y}], {x, -7, 7}, {y, -7, 7}] 

I just get a blank plot.

Best,

Ben

I would like to derive the PDF for an ''annulus'' type distribution, defined by the parameters $\theta\sim U(0,2 \pi)$ and $d\sim N(0,\sigma)$; where $\theta$ is the angle round a circle of radius $r$, and $d$ is the deviation normal to the circle's perimeter.

I can generate sample points easy enough, by the following:

fTorusProjector[xCentre_, yCentre_, \[Theta]_, d_] := {xCentre + d Sin[\[Theta]], yCentre + d Cos[\[Theta]]} fTorusRand[r_, \[Sigma]_] := Module[{\[Theta] = RandomReal[{0, 2 Pi}], d = RandomVariate[NormalDistribution[0, \[Sigma]], {1}][[1]]}, fTorusProjector[r Sin[\[Theta]], r Cos[\[Theta]], \[Theta], d]] ListPlot[Table[fTorusRand[5, 0.5], {i, 1, 10000}]] 

Which results in a plot similar to the one below: enter image description here

My question is, is there a way to derive an analytic form for the PDF of this distribution? I can't help thinking that there's probably a way I'm missing, but am not sure how to proceed here.

Even an approximate PDF / one that mimics the above behaviour would suffice.

Edit: I have tried using the following to get Mathematica to approximate a PDF of the above sample:

 empD = EmpiricalDistribution[data]; 

However, when I try to draw this using:

ContourPlot[PDF[empD, {x, y}], {x, -7, 7}, {y, -7, 7}] 

I just get a blank plot.

Edit 2: Since $\theta$ and $d$ are independent, I can derive the joint PDF in these coordinates:

$p(\theta,d) = \frac{1}{2\pi} \times \frac{1}{2\pi} exp(-d^2/2\sigma^2)$

I suppose I can then use Jacobians to transform back into the $(x,y)$ frame, although am not sure how to do this?

Best,

Ben

added 280 characters in body
Source Link
ben18785
  • 3.2k
  • 17
  • 31
Loading
Source Link
ben18785
  • 3.2k
  • 17
  • 31
Loading