# Questions tagged [function]

A mapping between a set of inputs and a set of outputs.

196 questions
Filter by
Sorted by
Tagged with
50k views

### How to find the mode of a probability density function?

Inspired by my other question, I would like to ask how does one find the mode of a probability density function (PDF) of a function $f(x)$? Is there any "cook-book" procedure for this? Apparently, ...
3k views

### How can Logistic Regression produce curves that aren't traditional functions?

I think I have some fundamental confusion about how the functions in Logistic regression work (or maybe just functions as a whole). How is it that the function h(x) produces the curve seen in the ...
5k views

### Proof that if higher moment exists then lower moment also exists

The $r$-th moment of a random variable $X$ is finite if $$\mathbb E(|X^r|)< \infty$$ I am trying to show that for any positive integer $s<r$, then the $s$-th moment $\mathbb E[|X^s|]$ is ...
3k views

### Can a neural network learn a functional, and its functional derivative?

I understand that neural networks (NNs) can be considered universal approximators to both functions and their derivatives, under certain assumptions (on both the network and the function to ...
1k views

### How to estimate the accuracy of an integral?

An extremely common situation in computer graphics is that the colour of some pixel is equal to the integral of some real-valued function. Often the function is too complicated to solve analytically, ...
411 views

### Proving a sequence decreases (supported by plotting a large number of pts)

Many of the questions I've posted on SE in the last month have been in the goal of helping me solve this particular problem. The questions have all been answered, but I still can't come up with a ...
209 views

### Is there a way to recover a temporal dependence structure in a time series from a regression against time?

Consider a time series: $X_1,X_2,...X_{n-1},X_n$ This series can also be written as a function of time $X(t)$, so that: $X_1,X_2,...X_{n-1},X_n = X(t_1),X(t_2),...X(t_{n-1}),X(t_n)$ Most ...
502 views

### Advantages of approaching a problem by formulating a cost function that is globally optimizable

This is a rather general question (i.e. not necessarily specific to statistics), but I have noticed a trend in the machine learning and statistical literature where authors prefer to follow the ...
397 views

### Function of random variables

I am not sure what the right keywords would be for this but I would like to know if it is possible to apply functions to random variables. I think it may make sense in terms of expected value but I ...
294 views

### How to properly handle Infs in a statistical function?

Suppose I have a function such like: f <- function(x){ exp(x) / (1 + exp(x)) } it's supposed to work for any real value of x, but actually it returns NaN ...
2k views

### How to understand the geometric intuition of the inner workings of neural networks?

I've been studying the theory behind ANNs lately and I wanted to understand the 'magic' behind their capability of non-linear multi-class classification. This led me to this website which does a good ...
2k views

### In spatial regression, what is a spherical autocorrelation structure?

I have a large gridded dataset for the globe (i.e a spherical, wraparound surface) that I'm applying spatial regression to (using a CAR model). I've been using the default autocorrelation function, ...
7k views

### How to measure the shift between two cumulative distribution functions (CDFs)?

How to measure the shift between two cumulative distribution functions (CDFs)? Specifically, in the image below, how meaningful is the shaded area? It is supposed to measure the shift between the ...
1k views

### What is an induced probability function?

My textbook defined the probability function of a random variable as: the function $P_X$ is an induced probability function on $X(\Omega)$, defined in terms of the original function P. In other ...
119 views

### Are dependent variables necessarily functions of one another?

The problem Suppose you have two variables $X_1,X_2$ so that $X_1\not\perp\!\!\!\!\! \perp X_2$. Do we necessarily have that a functional relationship exists between them? I am assuming random ...
105 views

### Generating uniform points inside an $m$-dimensional ball [duplicate]

The present question follows on from some other questions on this site asking how to generate uniform points inside a disc (see e.g., here, here and here). The natural extension of that problem is to ...
153 views

### Does $\mathbb{P}(X < a) = \mathbb{P}(f(X) < f(a))$?

If $f(x)$ is a monotonic increasing function, then does $\mathbb{P}(X < a) = \mathbb{P}(f(X) < f(a))$? My intuition says it's true but I cannot prove the case nor find the name of the theorem.
147 views

### Limit of Bernoulli R.V.s is a singular distribution

Working through an exercise in Probability (the question can be found in Lamperti). Let $X_1,\dots$ be independent Bernoulli random variables with $\mathbb{P}(X_i=1) = p$ and $\mathbb{P}(X_i=0)=1-p$. ...
115 views

### Optimization: Convex function

Problem statement Use the deﬁnition of convexity of a function, i.e., that for any $\boldsymbol{x}$, $\boldsymbol{y} \in \mathbb{R}^{d}$ and $\lambda \in \left [0,1 \right ]$ we have \begin{align*} ...
4k views

### Neural network failing because of Infinity

I have different activation functions in my network. I have noticed my networks failing (producing NaN). The reasoning behind this is: I have a large layers with ...
472 views

### Arbitrary function approximation in one dimension

Suppose we have some arbitrary function $f: X \mapsto Y, X \in \mathbb{R}, Y \in [0, 1]$. It may be smooth but it may not. I am looking for some way to approximate this function given samples drawn ...
2k views

### Showing Bayesian updating in R

I'm very new to Bayesian and am very interested in understanding the concept that each posterior from a previous test, can be used as a prior for a current test or in Lindley's (2000) words 'Yesterday'...
832 views

1k views

### R: Defining a new continuous distribution function to use with Kolmogorov-Smirnov Test

I wish to run the Kolmogorov-Smirnov test on my data to determine how well it conforms to a specific continuous distribution function I have in mind. If my understanding is correct, the Kolmogorov-...
426 views

### How to write diff() mathematically?

I am using R/Python diff() operation. e.g., https://docs.scipy.org/doc/numpy-1.14.0/reference/generated/numpy.diff.html I would like to know if there is a ...
155 views

### Do optimization problems written in argmax form represent a function?

If I write $$\hat{x} = \underset{x}{\text{argmax}}\ f(x,y)$$ can I assume that what is to the right hand side (RHS) of the equal sign is a function in the rigorous sense of the word? Under what ...
286 views

### What is this formula?

i have been asked to plot a graph of the residuals from the following formula: |y(hat)/y|-1 they said that it was MAPE but i have the formula for MAPE as: ...
99 views

### How do you find the asymptotic distribution of a function of the sample mean?

There are a number of questions on this site that ask for the asymptotic distribution or moments of some function of the sample mean for IID data (see e.g., here, here, here, here and here). All ...
40 views

### Random variable independence

Let's say I have two independent random variables $X$ and $Y$. Because of this independence, I can evaluate (for example) the following functions: $$f(X,Y)=X+Y$$ $$g(X,Y)=|X-Y|$$ But I can't ...
2k views

### How to calculate the probability of an event occuring within n days, if we know the probability of it occuring per day

If an event can occur at most once per day, and the probability of it occurring is 10%. What is the upper-bound on the probability that the event occurs in an interval of L days of a month (assuming ...
872 views

### Given the distribution of a variable X, what is the distribution of f(X)?

Suppose I know the mean and standard deviation of a (roughly) normally distributed variable x. Is there any way for me to calculate the mean and standard deviation of f(x)? The particular problem I ...
40 views

629 views

### Expected value of bounded function? [closed]

The expected value of a function is $$E[g(x)] = \int_{-\infty}^{\infty}g(x)f(x)dx.$$ What happens if $g$ is a function such as $g:\mathbb{R}\rightarrow]a,b[$? Does the expected value exist? Should ...
49 views

### Is there a name for $\sum P(x) \frac{P(x)}{Q(x)}$ ? (P and Q are pmf)

I know that $\sum P(x) log \left( \frac{P(x)}{Q(x)} \right)$ is the kl-divergence. I'd like to know if there is a name for $\sum P(x) \left( \frac{P(x)}{Q(x)} \right)$ (no log), but couldn't find one. ...
613 views

### Difference between function and distribution?

I have constant function as $$y = exp(-x^2)$$ This also represent gaussian distribution with mean zero and variance of 0.5 Now if we take sample from this function, which will always be from this ...
4k views

### Check if pmf/pdf is valid

According to this and this, we can say that a function f is pmf/pdf iff f is non-negative and the sum/integral over... is 1. But for example, for pmf, there is also a property called "countable ...
1k views

### R - Calculate trendline and extend it for 365 days automatically

I have daily data with logarithmic decreasing trend (around 30-days-data). In excel I'm calculating these data's trendline and with that trendline equation, I'm projecting these values to 365-days ...
77 views

### How to make the best final prediction of the optimum value in a Bayesian optimization process?

I'm trying to understand the process of Bayesian optimization of a black box function and the bit I'm confused about is how to make the very last prediction of the true maximum after you have made all ...
54 views