Questions tagged [calculus]

For statistical questions involving calculus. Please use also a more statistical tag. For purely mathemathical questions about the calculus, it is better to ask at math SE https://math.stackexchange.com/

Filter by
Sorted by
Tagged with
2
votes
1answer
21 views

Deriving OLS estimator

In my course on linear models we derived the OLS estimator by minimizing the residuals $F(\phi) = (Y-X\phi)'(Y-X\phi)$. However there is one step that I do not understand: to find the minimum over all ...
0
votes
0answers
12 views

Calculating P martingales of the following equation and finding the distribution of a random variable [closed]

Suppose that an asset price evolves according to the binomial model. For simplicity suppose that the risk-free interest rate is zero and Delta T is 1. Suppose that under the probability P, at each ...
1
vote
0answers
25 views

Calculus in Moment Generating Function

On page 156 of the Statistics textbook, "Mathematical Statistics and Data Analysis" by John A. Rice, I came up with two questions on the section about Moment Generating Functions: 1. Why ...
2
votes
1answer
42 views

Is the sample mean of the gradient the same as the gradient of the sample mean?

By the law of large numbers, given a continuous random vector $\mathbf{x}$, then: $$ \mathbb{E}[\mathbf{x}] \approx \frac{1}{N} \sum_{i=1}^{N} \mathbf{x}_i $$ Where $\mathbf{x}_1,\mathbf{x}_2,...,\...
0
votes
0answers
13 views

Algebra: When calculating the variance of Zero-inflated Poisson dist

I am deriving the variance of zero-inflated Poisson distribution, whose PMF is $$ P(X=k) = \begin{cases} \pi + (1-\pi)e^{-\lambda} \; , \; if \; k=0 \\ (1- \pi) e^{-\lambda} \frac{\lambda^k}{k!} \; , \...
0
votes
0answers
9 views

A question about Grad-CAM method

During computation of $α^c_k$ while backpropagating gradients with respect to activations, the exact computation amounts to successive matrix products of the weight matrices and the gradient with ...
1
vote
0answers
75 views

How to differentiate the hinge loss?

I'm asked to differentiate the following hinge loss term. $$ \dfrac{1}{n}\sum _{\left( x_{i},y_{1}\right) \in S}\sum _{j'=1}L\left( w^{j'};\left( x_{i},y_{i}\right) \right) $$ where $$ L\left( w^{j'};\...
0
votes
1answer
17 views

Approximate / Standardize value in certain range

I have table with numeric values like ...
1
vote
2answers
37 views

Backpropogation Derivatives

I've been working on trying to understand the backpropogation algorithm and the calculus behind it, and in my work I have stumbled across a sort of odd situation. I am just practicing on a 1 input, 1 ...
1
vote
1answer
16 views

What is the mean average of $y=kg^t$ from $t=a$ to $t=b$ [closed]

Mean average of $y$ in $y=kg^t$ from $t=a$ to $t=b$. $g$ is a constant, $t$ varies. I have looked this up in textbooks and online and all I can find is the mean average of a function where $t$ is a ...
1
vote
0answers
61 views

Is there a smart algorithm of finding the maximum of $X^{\top}a$ with $X$ and $a$ both belong to some compact convex set? [closed]

Suppose $X\in\mathcal{X}\subset R^k$ and $a\in\mathcal{A}\subset R^k$, where $\mathcal{X}$ and $\mathcal{A}$ are both compact convex set. Is there a systematic way of finding the maximum of $X^{\top}a$...
2
votes
2answers
44 views

Book recommendations needed - building foundational knowledge for ISL - Introduction to Statistical Learning (by Gareth James)

I'm trying to build a data science base from scratch. I started a book called Introduction to Statistical Learning by Gareth James and found that there are many mathematical & statistical concepts ...
2
votes
1answer
81 views

Differentiating $ (y-X\beta)^T(y - X \beta) $ with respect to $\beta$

How do I differentiate $$ (y-X\beta)^T(y - X \beta) $$ with respect to $\beta$. The result I saw was $$X^T(y - X\beta)$$
0
votes
0answers
25 views

How does truncated power basis function imposed the continuity constraint for each knot in splines

This was sort of answered in this post Truncated power basis function and continuity in b-splines Using high-enough powers in [truncated power][1] functions allows you to "match up" not ...
0
votes
0answers
17 views

Evaluating the integral using conjugate distributions

Hello I just want to verify that I am evaluating this integral correctly. When I implement it in code values seem to be incorrect. could be my implementation though. Thank you for the second pair of ...
0
votes
0answers
26 views

Backpropagation through time for stacked RNNs

I was able to find the partial derivative of the cost function with respects to a single variable without much difficulty. However, this requires propagating backwards through the network for each ...
1
vote
0answers
34 views

Evaluation of Limit involved in the proof of Asymptotic Unbiasedness

We know that $S^{2}$ is an unbiased estimator of $\sigma^{2}$ and $S$ is a biased estimator of $\sigma$. But if $n\rightarrow\infty$, then $S$ is an asymptotically unbiased estimator of $\sigma$. I ...
4
votes
1answer
282 views

Derivation of M step for Gaussian mixture model

Summary So to summarize my question, how can I take \begin{align} = \sum_{i=1}^{n}W_{i1} \left(log (1-\sum_{j=2}^{K}\pi_j) -\frac{1}{2} log(|\Sigma_1|) -\frac{d}{2} log(2\pi) -\frac{1}{2}(x_i-\mu_1)^{...
1
vote
0answers
22 views

Question about Functions of Several Random Variables

In the Mathematical Statistics and Data Analysis by John Rice, it states that for random variables $U,V$ which are functions of random variables $X,Y$, we have: We know that $$f_{UV}(u,v) = f_{XY}(h_1(...
6
votes
1answer
203 views

Correlation between normal and log-normal variables

(This is not a homework question.) Let $(X_1 \sim N(\mu_1,\sigma_1), X_2 \sim N(\mu_2, \sigma_2))$ be a bivariate normal random variable with the correlation between $X_1$ and $X_2$ given by $\rho$. ...
0
votes
2answers
58 views

Maths for deeply understanding backpropgation

I have been trying to develop a deeper understanding of Neural Networks so I can understand the libraries such as tensorflow and others. I have had good success with pereceptron models, and have a ...
3
votes
2answers
57 views

How does one compute a variational derivative?

The expected regression loss is given as:$$E[L]=\int\int \{y(\mathbf x)-t\}^2 p(\mathbf x,t)d\mathbf xdt$$ To minimise the expected loss,Euler Lagrange equation is used which goes like this in the ...
0
votes
1answer
153 views

Expected Predicted Error (EPE) with L1 loss

In Element of Statistical learning it is saying on page 20, equation 2.18. That using the L1 norm instead of the usual L2 norm leads to an $f(X)$ optimising the EPE being the median instead of the ...
2
votes
0answers
42 views

Why does the dimension of gradient and Hessian matrix not conform for this function?

The function is $f(\mathbf{x}) = e^{-\frac{1}{2}\mathbf{x^TAx}}$, where $\mathbf{A}$ is a square symmetric matrix, and $\mathbf{x}$ is an n-vector. What I found were: $$ \begin{align*} \nabla f ...
0
votes
0answers
32 views

How Hessian matrix is helping in taking big step towards minimization and how is it better than usual Gradient Descent? [duplicate]

I know what Hessian is and $θ:=θ−H^{-1}f′(θ)$ this relation too from Newton Raphson but what i dont understand is how Hessian is really helping with big step and also how is this efficient in ...
0
votes
0answers
65 views

What is the first order derivative of linear regression's cost function using matrix calculus?

For linear regression's cost function J(b), where X is a n*m matrix, b is a m*1 vector and y is n*1 vector: First order derivative with respect to vector b (coefficients) is shown to be Using the ...
1
vote
0answers
144 views

On the convergence of infinite sum of a hypergeometric function resulted from a nested sum

I am interested in finding the CDF of the sum $U=\sum_{i=0}^N U_i$ where: $$F_{U_i}(x)=\sum_{n=0}^\infty \frac {2(-1)^nR^{k\alpha+n\alpha}x^{k+n}}{\Gamma(k)n!\theta^{k+n}(k+n)(k\alpha+n\alpha+2)}$$ ...
1
vote
0answers
38 views

How to approximate expectation and variance of an integral from a discrete Time series financial dataset?

I have discrete time series financial data, with time($u$), price($S$) and someVariable($q$) which looks something like this. ...
0
votes
0answers
38 views

Calculus with quadratic B-spline

After fitting a quadratic B-spline in R with the cobs package : Rbs <- cobs(x,y, constraint= "decrease", pointwise = con) I would like to do some calculus on ...
1
vote
0answers
62 views

what is the relation between change of variables in probability and calculus?

I want to know if the change of variables formula in probability is a special case of the change of variables in calculus, or something different. Trying to think for myself, first write the CoV for ...
1
vote
1answer
42 views

Symmetry between integrals including absolute value

So I came across below symmetry in my probability course that I can't understand. I understand how the lower bound changes when removing the absolute value operator, but how does the 2 disappear?
1
vote
0answers
17 views

A maximization problem involving random variables: a special case

Consider random variables $X$ and $Y$ that are jointly normally distributed, $$ \begin{pmatrix} X \\ Y \end{pmatrix} \sim \mathcal{N} \left[ \begin{pmatrix} \color{blue}0 \\ \mu_Y \end{pmatrix} , \...
1
vote
0answers
28 views

A maximization problem involving random variables

Consider random variables $X$ and $Y$ that are jointly normally distributed, $$ \begin{pmatrix} X \\ Y \end{pmatrix} \sim \mathcal{N} \left[ \begin{pmatrix} \mu_X \\ \mu_Y \end{pmatrix} , \begin{...
1
vote
0answers
13 views

How to calculate logarithmized average monthly returns

I am currently reading the following paper https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2750064 . On page 57 the researchers state that they calculate the logarithmized average monthly returns ...
0
votes
1answer
108 views

Find marginal distribution

The random vector $(X,Y)$ is uniformly distributed over $$D=\{(x,y): 0 \leq x \leq 2 , 0 \leq y \leq 2-x\}.$$ Find the marginal distribution of the random variables $X$ and $Y$. For the radom vector $...
2
votes
1answer
127 views

Derivative of expectation where the variable appears in the integration limit and in the integrand?

I want to calculate the derivative of $$\varphi(\mu) = \int_{-\infty}^{\mu} r(x-\mu) f(x)dx,$$ wrt to $\mu$, where $r$ is a function and $f$ is a density function. How can I account for the presence ...
6
votes
2answers
172 views

Why does Judea Pearl call his causal graphs Markovian?

In his texts on causality, Judea Pearl always refers to the simplest graphs he uses, i.e. the acyclic graphs with independent confounders, as Markovian. I don't see why these graphs contain anything ...
1
vote
0answers
259 views

Solving integrals in R

I would like to write an R function for solving the following equation: Essentially I would like to be able to set or vary the parameters values of "m" and "s" and those parameters in "p(t)" ...
1
vote
0answers
1k views

How to manually calculate odds ratio for continuous variables?

In school, long before learning about logistic models, I've been taught how to calculate odds ratios by hand. Formula was based on a contingency table, just like this: This is very easy to ...
3
votes
1answer
287 views

Properties of Kernel Density Estimators

Given Let $X \in \mathbb{R}$ be a real-valued random variable with theoretical probability density function (pdf) $f(x)$ and corresponding cumulative distribution function (cdf) $F(x)$. Let $X_1, X_2,...
0
votes
0answers
9 views

Threshold optimization with two parameters where first parameter need to be minimum and second value to be maximum

We have threshold values ranging from 1 to 10 where attributes p1, p2 increase with increase in threshold. Our intention is to find threshold with minimum p1 and maximum p2. It would be of great help ...
1
vote
1answer
366 views

Law of Iterated Expectations Example

Consider a randomized experiment (AB test), where $n$ units are randomized into the treatment group $T_i=1$ and control group $T_i=0$. Let $M_i\in P$ denote the observed value of a continuous variable ...
0
votes
1answer
25 views

Expectation / Summation inequality with multiple indices

Part of a solution to an exercise in the book Stochastic Processes From Application to Theory (exercise 87) is the following summations: $$\sum_{i\ge1}P\left(I_i \ge i \right) = \sum_{j \ge i\ge1}P\...
1
vote
1answer
853 views

Relationship between first and second order condition of convexity

Suppose we have a function $f(\boldsymbol{x})$ and its hessian, i.e $\nabla_{\boldsymbol{x}}^2f(\boldsymbol{x})$, equals $\mathbf{0}$. We know that for convexity $\nabla_{\boldsymbol{x}}^2f(\...
1
vote
0answers
386 views

What does gradient with respect to a function mean [duplicate]

I am trying to understand this paper better Greedy function approximation: A gradient boosting machine, but I start having difficulty at around Equation (6) and (7). What does a gradient w.s.t. to an ...
2
votes
1answer
43 views

Simple Appplication of Law of Iterated Expectation

Consider a randomized experiment (AB test), where $n$ units are randomized into the treatment group $T_i=1$ and control group $T_i=0$. Let $M_i\in P$ denote the observed value of a continuous variable ...
1
vote
0answers
47 views

Verifying sub-exponential property when a random variable is not sub-gaussian pro

I am referring to the Example 2.4 (page 16) in this book chapter https://www.stat.berkeley.edu/~mjwain/stat210b/Chap2_TailBounds_Jan22_2015.pdf Suppose $Z \sim N(0,1)$ and random variable $X=Z^2$. ...
1
vote
1answer
326 views

Expected Loss Calculation

How do you solve the integral $$E(L(\theta_A,\theta_B)) = \int_0^1\int_{\theta_B}^1(\theta_A - \theta_B)f(\theta_A)f(\theta_B)d\theta_Ad\theta_B$$ where $\theta_A \sim Beta(\alpha_1, \beta_1)$ and $\...
2
votes
2answers
61 views

Simple Log-likelihood question

I've got a simple question about deriving log-likelihoods. I am stumped by the following--> If the log-likelihood is: 𝑙(𝜆1,𝜆2) = 𝑦1 log(𝜆1𝐹1)−𝜆1𝐹1 −log((𝑦1)!)+𝑦2 log(𝜆2𝐹2) −𝜆2𝐹2 −log⁡ (...
1
vote
0answers
18 views

Maximize profits by setting price

I am working on a model to set a price that maximizes profits. The equation for profits is: Profits=price x (# sold) - (fixed cost) x (# sold) I have models ...