Questions tagged [montecarlo]

Monte Carlo methods are stochastic (probabilistic) systems that use many random samples to derive properties of a complex system.

Monte Carlo methods are stochastic methods that use large sample sizes to gather information about a complex system. The outcomes of these trials can then be used to draw generalizations about the system as a whole, without first needing a proper solution.

Monte Carlo methods are especially useful when a numeric solution is available, but which is too complex to solve for directly. They are general enough that their use is widespread; Wikipedia provides a list too exhaustive to reproduce here.

1260 questions
0
votes
1 answer

Averaging solutions in monte carlo simulation using Octave

I am writing a code to find the solution to the Laplacian with a given set of boundary conditions using a Monte Carlo simulation in Octave. I have written the initial code to find single solutions, but this needs to be run quite a few times and…
0
votes
0 answers

Integer Linear Programming- Efficient algorithm for optimization prob

I have a very specific Integer Linear Programming problem to tackle:- https://math.stackexchange.com/questions/1724708/efficient-time-complexity-algorithm-for-linear-programming-problems I did ask this question on the math forum but I think its more…
0
votes
2 answers

Finding the area underneath y = x^4 in the domain 2 ≤ x ≤ 4 by using a Monte Carlo Method

In my approach, I will use a hypothetical rectangle with co-ordinates (2,0) , (4,0), (2, 256) and (4, 256). I will generate random xy co-ordinates within this rectangle and find the ratio between the number of co-ordinates that fall within the…
Abhinav
  • 35
  • 4
0
votes
3 answers

Find area of two overlapping circles using monte carlo method

Actually i have two intersecting circles as specified in the figure i want to find the area of each part separately using Monte carlo method in Matlab . The code doesn't draw the rectangle or the circles correctly so i guess what is wrong is my…
Suzy
  • 99
  • 2
  • 9
0
votes
3 answers

NSDecimalNumber for intensive scientific applications?

Let's say I'm writing a "DayData" class, containing the ivars NSString *symbol; //such as "AAPL" NSString *currency; //such as "USD" NSDate *day; double open; double high; double low; double close; The last four ivars are the open,high,low,close…
Enchilada
  • 3,859
  • 1
  • 36
  • 69
0
votes
2 answers

How to implement random sampling of a set of vectors in java?

I have a huge number of context vectors and I want to find the average cosine similarity of them. However, it's not efficient to calculate it through the whole set. That's why, I want to take a random sample from this set. The problem is that each…
bc_16
  • 3
  • 3
0
votes
1 answer

Random function not working when used with vectors

I am using R. I have made a random function (using monte carlo integration) that approximates the arctan function (equal to the integral of 1/(1+x^2)). It seems to work well and gives accurate approximations. For example 3*arctan(sqrt(3)) should…
user124249
  • 79
  • 5
0
votes
0 answers

Interpreting description of data generating process

I am trying to generate monthly stock data using a one-factor model: $$R_{a,t} = \alpha + B*R_{b,t}+\epsilon_{t}$$ The description says: $R_{a,t}$ is the excess asset returns vector, $\alpha$ is the mispricing coefficients vector, $B$ is the factor…
user3742038
  • 77
  • 1
  • 8
0
votes
1 answer

What's the time complexity of Monte Carlo Tree Search?

I'm not sure whether this question should go on stackoverflow or cs.stackexchange.com, so please let me know if I should move it. I'm trying to find the time complexity of Monte Carlo Tree Search (MCTS). Googling doesn't help, so I'm trying to see…
bigblind
  • 12,539
  • 14
  • 68
  • 123
0
votes
0 answers

How to invert a density distribution?

I'm working with the RGB cube, trying to create a maximal palette of strongly distinct colors. So I'm taking slices of the RGB cube perpendicular to the diagonal between the black and white vertices and applying the CIELab color distance formula. It…
0
votes
1 answer

Simulating archers hitting a target monte carlo method

3 archers are shooting at a target with probabilities p1, p2, p3. With a Monte Carlo simulation I am supposed to find an approximation of the probabilities of the following events: randomly chosen archer hits the target // already solved the target…
Hydroxis
  • 95
  • 1
  • 12
0
votes
0 answers

Make matlab code more efficient

Just started to code in matlab because I am studying the book An Introduction to Financial Option Valuation by Higham. One of the example codeblocks he gives (this is the source) is: V = zeros(M,1); …
hY8vVpf3tyR57Xib
  • 3,574
  • 8
  • 41
  • 86
0
votes
2 answers

Monte Carlo approximation of pi with a sphere

I'm trying to estimate pi by uniform random sampling of points (x,y) inside a circle of radius 1 and then computing the corresponding z value in a sphere. Actually it is only a quarter-circle to simplify the computation. Then I compute the average z…
Rafael Korbas
  • 2,213
  • 3
  • 19
  • 30
0
votes
3 answers

Getting a subroutine to return three seperate arrays of random numbers in C

I currently have code for a subroutine to return a pointer to an array. This array is a list of random numbers for a one dimensional monte-carlo integral. I am now trying to do a multi dimensional equivalent which requires 3 arrays of random…
JMzance
  • 1,704
  • 4
  • 30
  • 49
0
votes
1 answer

Implementing Monte Carlo Cross Validation on linear regression in R

I'm having a dataset of 90 stations with a variety of different covariates which I would like to take for prediction by using a step-wise forward multiple regression. Therefore I would like to use Monte Carlo Cross Validation to estimate the…
xmisx
  • 55
  • 1
  • 10