TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Introduction to Monte Carlo Methods

78 点作者 alexhwoods将近 10 年前

6 条评论

tunesmith将近 10 年前
I used a basic Monte Carlo technique to help buy a new house. We wanted to know what maximum price we could look at for the new house. But we didn't know how much cash I'd clear from the old house to sell, how much cash my wife would be able to contribute, what interest rate we'd lock at for the new house, etc. But, I could reasonably estimate a normal distribution that each of those scenarios would fall in, even if those distributions were pretty wide (to be conservative). Then I just made a row in excel that picked a random value from each, and calculated the maximum price we could afford for the new house in that case, and then I dragged that row down 10,000 times, and then we looked at what price we could afford in 95% of those cases. It helped our confidence a lot in knowing what we could definitely afford.
yummyfajitas将近 10 年前
The error most likely didn&#x27;t stop converging - its just that n^{-1&#x2F;2} is a very slow convergence rate.<p>If you want actual control of the error, and to know how many samples you need, you need to do some arithmetic with the central limit theorem or hoeffdings inequality.
评论 #9950001 未加载
learnstats2将近 10 年前
One potential source of confusion is that &quot;Monte Carlo method&quot; and &quot;Monte Carlo algorithm&quot; are not the same.<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Monte_Carlo_method" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Monte_Carlo_method</a> described here - any method using random numbers to generate data - increasingly useful in many fields.<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Monte_Carlo_algorithm" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Monte_Carlo_algorithm</a> any algorithm with a chance of giving an incorrect result - most often associated with testing for prime numbers.
lindig将近 10 年前
&gt; We then assess the distance d between a car and the car in front of it. If the car’s velocity is greater than or equal to the distance, we adjust it’s velocity to <i>d-1</i>.<p>I found this a little confusing as velocity and distance seem to have the same units. Or did you mean to write <i>v-1</i>?
评论 #9950816 未加载
vvanders将近 10 年前
Also great for performance profiling when you don&#x27;t have fancy tools. Just breaking 5-10 times to see where you land can provide some useful results(to be verified of course).
mindcrime将近 10 年前
I&#x27;m a big fan of Monte Carlo simulations, and highly encourage their use. But is important to remember that there are a few cases where a Monte Carlo model (or, as far as that goes, any simulation probably) can be pretty off, perhaps to the point of being useless, or even misleading in a damaging way:<p>Off-hand, I can think of two big ones:<p>1. Missing variables. Of course this doesn&#x27;t matter if you&#x27;re only working with one variable, like estimating the value of pi. But if you have a multi-variable model, and your model is missing one or more variables that affect - in real life - the thing you&#x27;re trying to simulate, then the model may be less than worthless. This is why it&#x27;s so crucial to be sure that you&#x27;ve identified all the variables. Unfortunately, for complex real-world scenarios, that&#x27;s often very difficult.<p>2. If the model (rather, the output from the model) itself affects the real-world domain you&#x27;re simulating.<p>That said, MC is a very powerful and useful technique and it&#x27;s worthy of being in everyone&#x27;s tool-belt.
评论 #9950725 未加载