Serving the Quantitative Finance Community

Search found 591 matches

  • 1
  • 2
  • 3
  • 4
  • 5
  • 40
by wileysw
October 24th, 2013, 3:01 am
Forum: Brainteaser Forum
Topic: Pdf curve for normal distribution
Replies: 14
Views: 8375

Pdf curve for normal distribution

<t>if you happen to know that when one draws samples x_i from a normal distribution with mean of mu, sqrt(sum{from i=1 to n}(x_i-mu)^2/n) is the maximum likelihood estimator (though biased) of the standard deviation, then this precisely states that the p.d.f. at this particular single sample x=3 rea...
by wileysw
October 24th, 2013, 2:44 am
Forum: Brainteaser Forum
Topic: Efficient algorithm to compute all permutations of set {1,2,....,n}
Replies: 64
Views: 11822

Efficient algorithm to compute all permutations of set {1,2,....,n}

<t>Cuchulainn, i agree with outrun on the definition of the permutation of multi-sets.note Steinhaus-Johnson-Trotter algorithm cannot be extended to multi-sets, simply because if one restricts herself to adjacent swaps, there are multi-sets whose graph does not have a hamiltonian path, e.g., {a,a,b,...
by wileysw
October 12th, 2013, 2:53 pm
Forum: Brainteaser Forum
Topic: Can we solve the problem by maringale?
Replies: 5
Views: 7935

Can we solve the problem by maringale?

ymous, the martingale could be[$]\displaystyle \sum_{m=0}^{n-1}\left(\frac{q}{p}\right)^m[$],which is [1-(q/p)^n]/[1-(q/p)] when p!=q and simply n when p=q
by wileysw
October 12th, 2013, 2:41 pm
Forum: Brainteaser Forum
Topic: Efficient algorithm to compute all permutations of set {1,2,....,n}
Replies: 64
Views: 11822

Efficient algorithm to compute all permutations of set {1,2,....,n}

<t>Cuchulainn,from the page you posted of std::next_permutation, the algo generates the permutations in lexicographic order, so i would think it should have no issue handling multi-sets. it is less efficient than Steinhaus-Johnson-Trotter algorithm, as in most of the cases it needs more than one swa...
by wileysw
October 2nd, 2013, 3:43 am
Forum: Brainteaser Forum
Topic: Can we solve the problem by maringale?
Replies: 5
Views: 7935

Can we solve the problem by maringale?

EdisonCruise, yes, eq (1) works. and if p=q, just use n which is martingale, i.e., i = X*N + (1-X)*0 with your notation.one follow-up question, is it possible to write n as the limiting case of some equivalent form of (q/p)^n?
by wileysw
October 2nd, 2013, 3:37 am
Forum: Brainteaser Forum
Topic: Efficient algorithm to compute all permutations of set {1,2,....,n}
Replies: 64
Views: 11822

Efficient algorithm to compute all permutations of set {1,2,....,n}

<t>below is a related puzzle (that i believe has been discussed here before, but i was not able to find the link):suppose you need to key a 4-digit code to gain access to a safe. the keypad is unusual in that it always remembers the last 4 digits you have pressed and compares those to the code which...
by wileysw
September 13th, 2013, 5:12 am
Forum: Brainteaser Forum
Topic: Do electric coins dream of Markov chains?
Replies: 6
Views: 8338

Do electric coins dream of Markov chains?

gauravguptaiitd, your answer seems correct. it agrees with MS5's formula with p=2/3 and mine with p1(H)=p1(T)=1/2 and p2(H)=1/3
by wileysw
September 13th, 2013, 5:08 am
Forum: Brainteaser Forum
Topic: 3 touching regular n-gons
Replies: 35
Views: 12819

3 touching regular n-gons

<t>Vanubis1,yes, this seems to me works (though your n3 got inverted). it goes as n3(n1,B)<=n3(n1,1)<=n3(N+1,1). for the last step, the turning point of the function of n1 is when n1~n2, so the other ascending half is just the mirroring that can be removed by imposing the constraint of n1<n2.in my e...
by wileysw
September 7th, 2013, 7:31 am
Forum: Brainteaser Forum
Topic: Do electric coins dream of Markov chains?
Replies: 6
Views: 8338

Do electric coins dream of Markov chains?

<t>suppose p1->p2 or p2->p2 with T and p2->p1 or p1->p1 with H (special case of fair p1: p1(H)=p1(T)=1/2):[ 2 + p1(H) / p1(T) ] + [ 1 + p1(H)^2 / p1(T) ] / p2(H)suppose p1->p2 or p2->p1 with T and p1->p1 or p2->p2 with H:[ 1 + p1(H) ] * { 1 + [ 1 - p1(H) ] * [ 1 + p2(H) ] } / [ p1^2(H) + p2^2(H) - p...
by wileysw
September 7th, 2013, 6:41 am
Forum: Brainteaser Forum
Topic: 3 touching regular n-gons
Replies: 35
Views: 12819

3 touching regular n-gons

Vanubis1, this seems to me is just another form of greedy algorithm, no?
by wileysw
September 7th, 2013, 6:23 am
Forum: Brainteaser Forum
Topic: What's the expected return of this game?
Replies: 3
Views: 8322

What's the expected return of this game?

<t>EdisonCruise, if you set F(n)=E(n)+n-4, it becomes F(n)=F(n+1)/3, so F(1)=(1/3)^n*...another simple way is to note that E(n+1) is no different than E(n) except the extra $1 paid for round n (as the dice has no memory). thus E(n)-1=E(n+1).however, the tricky part is actually the optimal stopping c...
by wileysw
September 7th, 2013, 5:49 am
Forum: Numerical Methods Forum
Topic: Looking for tough integrals
Replies: 148
Views: 22963

Looking for tough integrals

<t>And2, but the partial sums would have a phase difference of a quarter period, no?consider the pedagogical case often used to illustrate convergence acceleration: (-1)^n/(2n+1) from n=0 to infty with sum of pi/4. there exists function such that [$]\displaystyle\int_0^{\pi/2}\sin(x)f(x+n\pi)dx = \i...
by wileysw
September 6th, 2013, 3:04 am
Forum: Student Forum
Topic: Integral calculus - Sread options
Replies: 6
Views: 6824

Integral calculus - Sread options

<t>tiponakela,here is A way that works when the exponent is a circle, i.e., the coefficients [$]\xi^2[$] and [$]\eta^2[$] are same:one can do a rotation [$]\{\xi, \eta\}\to \{(a-\alpha)\xi+(b-\beta)\eta, (b-\beta)\xi-(a-\alpha)\eta\}/r[$], where r is the normalization [$]\sqrt{(a-\alpha)^2+(b-\beta)...
by wileysw
September 5th, 2013, 10:18 pm
Forum: Numerical Methods Forum
Topic: Looking for tough integrals
Replies: 148
Views: 22963

Looking for tough integrals

<t>im surprised tanh-sinh is not working - it's known to handle well the case when end points are singularities. in some sense, it's overkill as the singularity is polynomial. one could use some less aggressive transformation than double exponential decay.Cuchulainn, can you post the values (i.e., t...
by wileysw
August 29th, 2013, 3:11 am
Forum: Numerical Methods Forum
Topic: Looking for tough integrals
Replies: 148
Views: 22963

Looking for tough integrals

<t>And2,for Alan's question, it becomes int from 0 to infty W'(x)*cos(x) and you break them into 0 to pi/2, then the intervals ( pi/2+k*pi, pi/2+(k+1)*pi )? i was simply suggesting ( k*pi, (k+1)*pi ). or do you have to pick cos(x) as the weight function?(btw, Cuchulainn, yes Lambert W satisfies the ...
  • 1
  • 2
  • 3
  • 4
  • 5
  • 40