Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6962705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:41:42+00:00 2026-05-27T15:41:42+00:00

I would like to get a different solution to a problem I have solved

  • 0

I would like to get a different solution to a problem I have solved “symbolically” and through a little simulation. Now, I would like to know how could I have got the integration directly using Mathematica.

Please consider a target represented by a disk with r = 1, centered at (0,0).I want to do a simulation of my probability to hit this target throwing darts.

Now, I have no biases throwing them, that is on average I shall hit the center mu = 0 but my variance is 1.

Considering the coordinate of my dart as it hit the target (or the wall 🙂 ) I have the following distributions, 2 Gaussians:

XDistribution : 1/Sqrt[2 \[Pi]\[Sigma]^2] E^(-x^2/(2 \[Sigma]^2))

YDistribution : 1/Sqrt[2 \[Pi]\[Sigma]^2] E^(-y^2/(2 \[Sigma]^2))

With those 2 distribution centered at 0 with equal variance =1 , my joint distribution becomes a bivariate Gaussian such as :

1/(2 \[Pi]\[Sigma]^2) E^(-((x^2 + y^2)/(2 \[Sigma]^2)))

So I need to know my probability to hit the target or the probability of x^2 + y^2 to be inferior to 1.

An integration after a transformation in a polar coordinate system gave me first my solution : .39 . Simulation confirmed it using :

Total@ParallelTable[
   If[
      EuclideanDistance[{
                         RandomVariate[NormalDistribution[0, Sqrt[1]]], 
                         RandomVariate[NormalDistribution[0, Sqrt[1]]]
                        }, {0, 0}] < 1, 1,0], {1000000}]/1000000

I feel there were more elegant way to solve this problem using the integration capacities of Mathematica, but never got to map ether work.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T15:41:43+00:00Added an answer on May 27, 2026 at 3:41 pm

    There are actually several ways you can do this.

    The simplest would be to use NIntegrate as:

    JointDistrbution = 1/(2 \[Pi] \[Sigma]^2) E^(-((x^2 + y^2)/(2 \[Sigma]^2)));
    NIntegrate[JointDistrbution /. \[Sigma] -> 1, {y, -1, 1}, 
        {x, -Sqrt[1 - y^2], Sqrt[1 - y^2]}] // Timing
    
    Out[1]= {0.009625, 0.393469}
    

    This is another way to do it empirically (similar to your example above), but a lot slower than using NIntegrate:

    (EuclideanDistance[#, {0, 0}] <= 1 & /@ # // Boole // Total)/
         Length@# &@RandomVariate[NormalDistribution[0, 1], {10^6, 2}] // 
      N // Timing
    
    Out[2]= {5.03216, 0.39281}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have seen this problem arise in many different circumstances and would like to
I would like to get data from from different webpages such as addresses of
I have a classification problem where I would like to predict an outcome, but
Would like to get a list of advantages and disadvantages of using Stored Procedures.
I would like to get up-to-date information on Google's index of a website, and
I would like to get the path to the execution directory of a Windows
I would like to get the absolute position of an element in relation to
I would like to get a list of the wireless networks available. Ideally this
I would like to get all the instances of an object of a certain
I would like to get some of your ideas about resource name / categorizing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.