Skip to main content

Questions tagged [numerics]

Also known as Numerical Analysis, Numerics aims to provide methods and algorithms for numerical computations.

0 votes
0 answers
32 views

Estimating correlation parameter from known value of bivariate normal distribution

I want to estimate the correlation parameter $\rho$ using the following expression taken from this paper (equation 10 on page 17): $$ \hat{s}^2+\hat{\mu}^2=N_2(N^{-1}(\hat{\mu}),N^{-1}(\hat{\mu}), \...
MysteriousBrit's user avatar
2 votes
1 answer
79 views

How to do log subtract (just like logsumexp) with probabilities? [closed]

To subtract a small probability from another, this answer has constraint on log probabilities l1 > l2: Subtracting very small probabilities - How to compute? but I need a function that works for ...
monotonic's user avatar
  • 201
2 votes
1 answer
55 views

What is a numerically stable way to generate an exponential distribution that properly yields very large, low-probability values in Excel and C++?

I have sets of sampled data with the following statistics: Because the mean is so close to the min, and because of our understanding of the process that generated the samples, we are treating the ...
All The Rage's user avatar
3 votes
1 answer
4k views

Understanding the advantages of BF16 vs. FP16 in mixed precision training

Brain float (BF16) and 16-bit floating point (FP16) both require 2 bytes of memory, but in contrast to FP16, BF16 allows to represent a much larger numerical range than FP16, so under-/overflows won't ...
Green绿色's user avatar
0 votes
0 answers
37 views

Numerical quadrature for Pareto distribution

I would like to numerically evaluate an integral of the following type, when evaluating $f(x)$ at any given point is numerically costly: $$ \int_{x_m}^\infty x^{-\alpha}f(x) \, dx, \quad \alpha >1, ...
spellard's user avatar
0 votes
0 answers
30 views

Gradient descent residual

I've implemented the gradient descent method for finding roots of a system of nonlinear equations and I am wondering how the residual is determined? Is the residual simply the Euclidean norm (2-norm) ...
blov's user avatar
  • 1
5 votes
2 answers
157 views

Approximating the standard normal density with the logistic density: How to numerically optimize $\infty$-norm?

Let's say that we want to use the logistic distribution as an approximation to the standard normal density. As the location parameter of the logistic distribution is $0$, the scale parameter $s$ is ...
COOLSerdash's user avatar
0 votes
1 answer
46 views

Get samples from a known log density

I have two distributions $p_a$ and $p_b$ and I want to sample from $p_c$, defined via the log density $$ \log p_c(x) = (1+w) \log p_a(x) - w \log p_b(x) $$ or via the desnity $$ p_c(x) = \frac{ p_a(x)^...
fabian789's user avatar
  • 111
2 votes
1 answer
49 views

MLE for parametric binomial model

I have a model in which $p_i=f(\theta,Z_i)$, where $Z_i$ are iid latent variables distributed with CDF $F_\theta$, and $d_i\sim B(n_i,p_i)$, where $B$ is the binomial distribution. The likelihood ...
user2520938's user avatar
1 vote
0 answers
47 views

Comparison of two models with different number of parameters

I want to compare two models, which has different number of parameters. The first model is Arbitrage free Nelson-Siegel model, which has the following equation: $y_{t}(\tau )=X_{1,t}+X_{2,t}(\frac{1-e^...
Shelley's user avatar
  • 111
1 vote
0 answers
282 views

Algorithm for Irwin Hall Distribution [closed]

I've been trying to create a function for the Irwin Hall distribution that doesn't face the same issue as the unifed package implementation. Because the function suffers from numerical issues, I ...
user1329307's user avatar
0 votes
0 answers
97 views

Numerical Stability when Inverse CDF Sampling from Truncated Density

Let $f(x)$ be the pdf of a random variable that we want to truncate to the interval $[a,b]$ and then sample from it. Let $F(x)$ denote the corresponding cdf. We can use inverse cdf sampling and ...
yrx1702's user avatar
  • 710
1 vote
1 answer
65 views

Can (or should) data dominated by two values be treated as categorical?

Problem. I have few data sets containing real values (aka observation and prediction). >85% of data values are oscillating between two values exactly (e.g. 0 or 10), while the rest are real numbers ...
Art's user avatar
  • 31
1 vote
1 answer
27 views

A question on computational complexity of a numerical differentiation (equation (5.77)) in Bishop's Pattern Recognition and Machine Learning

In page 249 of Christopher M. Bishop's book "Pattern Recognition and Machine Learning", it is said Again, the implementation of such algorithms can be checked by using numerical ...
zzzhhh's user avatar
  • 333
0 votes
0 answers
32 views

Numerically solving a sparse matrix equation

I want to find the $X$ that solves the matrix equation $$ AX = B $$ with $A$ and $B$ known - $
A$ and $X$ are rectangular, $A$ is $n \times m $ and $X$ is an $m \times n$, with $m > n$. (...
Christopher Turnbull's user avatar

15 30 50 per page
1
2 3 4 5
11