Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

New answers tagged

0

I'm posting as an answer because the comment became too long. :) Usually, this type of approach is better after some sort of standardization of the variables to make them comparable. So, we may transform the variables so that they make sense in similar ranges. The advantage of having the variables living more or less in the same range is that the ...


1

This doesn't really seem like it should pose a problem. If you run a regression with "price" as the dependent variable, then there will be variation in price, even given all the independent variables. But that's common; I'd say it's almost universal.


2

A Technical Lemma I'm not sure how intuitive this is, but the main technical result underlying your statement of the Halmos-Savage Theorem is the following: Lemma. Let $\mu$ be a $\sigma$-finite measure on $(S, \mathcal{A})$. Suppose that $\aleph$ is a collection of measures on $(S, \mathcal{A})$ such that for every $\nu \in \aleph$, $\nu \ll \mu$. ...


1

If there is a central interval where the density is $0,$ then the median of even a large number of observations cannot be anything close to normal. In the simulation below, the population distribution is a 50:50 mixture of $\mathsf{Unif}(0,1)$ and $\mathsf{Unif}(2,3),$ so that the density is $0$ in $(1,2).$ The simulation shows a histogram of 100,000 ...


-1

You are free to choose any value for the null hypothesis provided you use that value during your statistics calculations (e.g. t-value). In regression analysis, we attempt to determine coefficients each of which reflects the effect (linear) of an attribute on the dependent variable. Upon obtaining this coefficient, we check if the value we have found is ...


0

If the dependent variable is ordinal, then ordinal regression is probably the most advantageous approach in many situations. Disadvantages? 1) It is more complicated to do than a simple hypothesis test. 2) Your audience may not be familiar with it. 3) There are assumptions that should be considered (proportial odds assumption).


0

It does not always decrease. It just never increases. A proof is likely based on contradiction. Assume that the previous cluster assignment was better. Then at least one point was better, but then that point was not assigned to the closest center. For the other step you already have the proof that the arithmetic mean is the minimum for a fixed partition.


2

It helps to go back to basic definitions. A probability space is the triple $(\Omega, \mathcal{F}, P)$ where $\Omega$ is the sample space, $\mathcal{F}$ is the set of subsets of $\Omega$, called "events", on which $P$ is defined (normally the Borel $\sigma$-algebra), and $P$ is a probability measure. A random variable is a function $f: \Omega \mapsto E$, ...


1

I find it difficult to follow your question because of the notation (for instance, what are "examples"? Do you mean data points?). Anyway, maybe the following example will clarify your question. The k-means method is iterative; let's assume we have reached iteration i and the results at this point look like that (point for data and crosses for cluster ...


1

You are doing nothing wrong with the test per se. Chi squared tests for stochastic independence. I believe you may have misunderstood what the p value and significance actually tell you about your data. Consider what the example you gave shows: If you know that someone is female, you would judge the chance of her liking tea to be higher than if the person ...


6

Firstly, it is worth noting that the antecedent condition in your conjecture is a slightly stronger version of the condition for strict first-order stochastic dominance (FSD) $X \ll Y$, so it implies this stochastic dominance relationship. This condition is much stronger than what you actually need to get the result in the conjecture, so I will give you a ...


2

Under the assumption that $X$ and $Y$ are independent and continuous, \begin{align*}\Bbb P(X<Y)&=\Bbb E^Y[\Bbb I_{X<Y}\mid Y]\\ &=\Bbb E^Y[F_X(Y)]\\&>\Bbb E^Y[F_Y(Y)]\\ &=\int_{\Bbb R} F_Y(y) \, \text{d}F_Y(y) \\&= \frac{1}{2} \int_{\Bbb R} \, \text{d}F_Y^2(y)\\&=\frac{1}{2}F_Y^2(\infty)-\frac{1}{2}F_Y^2(-\infty)\\&=1/2\...


1

Provided the expectations exist, Cauchy-Schwarz inequality states $$E\left[(g(X))^2\right]E \left[(h(X))^2\right]\ge \left(E \left[g(X)h(X)\right]\right)^2$$ Choose $g(X)=I_{X>0}$, the indicator of the event $\{X>0\}$, and $h(X)=X$. And keep in mind that $$E(X)=E(X I_{X>0})+E(X I_{X<0})=E(X I_{X>0})$$


1

Although the mean absolute error seems like a natural error measure at first sight, it has the drawback that it is not related to confidence intervals in a natural way. That's why the mean quadratic error (aka the variance) is used instead. Another interesting property of the variance is that the arithmetic mean minimizes the variance. The mean absolute ...


0

Philosophically, there is nothing wrong with “eliciting a posterior.” It’s a bit more difficult to do in a coherent manner than with priors (because you need to respect the likelihood), but IMO you are asking a really good question. To turn this into something practical, “making up” a posterior is a potentially useful way to elicit a prior. That is, I take ...


6

If you have a belief about the distribution of your data after seeing data, then why would you be estimating its parameters with data? You already have the parameters.


5

In case of many problems in statistics you have some data, let's denote it as $X$, and want to learn about some "parameter" $\theta$ of the distribution of the data, i.e. calculate the $\theta|X$ kind of things (conditional distribution, conditional expectation etc.). There are several ways how can this be achieved, including maximum likelihood, and without ...


7

Well, in Bayesian statistics, you don't just "make up" your priors. You should be building a prior that best captures your knowledge before seeing the data. Otherwise, why anyone should care about the output of your Bayesian analysis is very hard to justify. So while it's true that the practitioner has some sense of freedom in creating a prior, it should ...


0

The bound you obtain is of order $e^{-\epsilon}$ as $\epsilon \to \infty$. I don't think you can do much better for general $\epsilon$. From the Wikipedia page on Product Variables the distribution of $w_i v_i$ is $K_0(z)/\pi$ where $K_0$ is a modified Bessel function. From (10.25.3) in the DLMF function list, $K_0(t) \sim e^{-t}/\sqrt{t}$ so that for $x$ ...


0

I will generalise your problem to allow an arbitrary sequence of binary variables with any probabilities. Consider sequences of times $t_1 < t_2 < t_3 < \cdots$ and outcomes $X_1,X_2,X_3,...$ with respective probabilities $\theta_1, \theta_2, \theta_3,...$. (In your game this represents the probability of a head on a coin.) These outcomes are ...


1

Partial advice, in no particular order, to succeed in your DS interview: Study through a book like Hastie et al.'s Elements of Statistical Learning or Barbers's Bayesian Reasoning and Machine Learning; forget videos for a long-term plan unless you decide to follow a long series of lectures. Do not get sucked into Deep Learning to begin with; it is cool and ...


1

Adding to Tim's answer, this is more of a comment than a full answer, but I disagree with the premise that it is very important to know the underlying data distribution to develop a good model You say you have noticed this ...in many textbooks Can you provide some references to textbooks that make this assertion ? Having said that, let's not ...


1

First of all, you never "know" the distribution. You make assumptions about distributions. If people say things like "height follows normal distribution" they do not mean that there's some force in the universe that makes the height be exactly consistent with some made up mathematical function. They mean that they've chosen normal distribution as an ...


0

Via some algebraic tricks, we have: For the first one, $$\begin{align}E[X^2\mathcal{I}(|X|<\tau)] &=\int_{-\tau}^\tau{|x|^2 f(x)dx}=\int_{-\tau}^\tau |x|^{1-b} |x|^{1+b}f(x)dx\\ &\leq\tau^{1-b}\int_{-\tau}^\tau|x|^{1+b}f(x)dx\leq \tau^{1-b}E[|X|^{1+b}]\leq a\tau^{1-b}\end{align}$$ For the second one, $$\begin{align}|E[X\mathcal{I}(X>\tau)]| &...


3

The underlying statistical model is $X_1,\ldots,X_n\sim Bernoulli(p)$ iid ($X_i=1$ iff friend $i$ gets a ticket; $n=7$), i.e. $Y_n=\sum X_i\sim Binomial(n,p)$. You wish to estimate $p$, having observed $Y_n=0$ Here are two approaches. Rule of three The maximum likelihood estimate is indeed 0. You could construct a confidence interval. A rule of thumb in ...


0

BEGINING OF EDIT When I wrote this, I misread your post. I treated success as rare rather than failures. The answer is the same, however. END OF EDIT There is a good first principles solution to this problem. You know that $$.0001<\theta<.01.$$ It appears you have no further information regarding the content so that $\theta$ can be treated as ...


0

From the help in the comments it looks like the rule of three is applicable here where the probability of failure would be $\approx \frac3N$ with 95% confidence.


1

When $z < 0$, instead of writing $$ F_Z(z) = Pr(\frac{1}{X} \leq z) = Pr( X \leq \frac{1}{z}) = F_X(\frac{1}{z}) $$ you must write $$ F_Z(z) = Pr(\frac{1}{X} \leq z) = Pr(1 \geq Xz) = Pr( X \geq \frac{1}{z}) = 1-F_X(\frac{1}{z}) $$ because every time you multiply or divide by a negative number (or in general any time you apply a nonincreasing function to ...


-1

I'm not entirely sure about your $\Omega=\lbrace0, 1\rbrace^N$, is $\Omega$ the set of all vectors of length exactly $N$ with entries in $\lbrace 0, 1 \rbrace$ or is $N$ misguiding and $\Omega$ is actually the set of all vectors of any length with entries in $\lbrace 0, 1 \rbrace$? Anyway, this looks very much like a homework in measure theory/stochastics ...


0

Since 4 coin tosses would be independent events, that means joint probability would be P(C1,C2,C3,C4) = P(C1)*P(C2)*P(C3)*P(C4) Since this is a coin toss, there is 0.5 probability to get either heads and tails There can 2^4 = 16 combinations, out of which 8 would be when you would get some money and 8 would be when you do not get any money. Following on ...


1

Say you have $n$ data points (data of the student academic history) and you want to be able to predict whether they continue studying advanced math in college as you suggest. In this case, a good choice of model would be simple logistic regression. You would encode the response (in this case whether or not they continued in advanced math) as $Y_i = I(A)$ ...


0

Your reward, $R$, is the number of tails times unit reward, i.e. $R=0.25X$ dollars. Here, $X$ is number of tails out of $n=4$ tosses. It's well known that $X$ is a Binomial RV, and we can use its mean and variance, i.e. $E[X]=np, \operatorname{var}(X)=np(1-p)$, where $p$ is probability of tail, and $n$ is total number of tosses. You haven't specified $p$, ...


1

I would combine your idea of the KS-test and the answer below your question, if the size of the $X$ and/or $Y$ is small: Sample (uniformly) $B$ times (e.g. $B=1000$) a subset $X_b$ of $X$ of size $|Y|$ and calculate the Kolmogorov-Smirnov statistic $D_b$ from $X_b$ and $X$. This gives you an empirical distribution of the values $D_b$. Calculate $D^{\ast}$ ...


0

The critical relation is: $$P(a\geq b+c)\leq P(a\geq b \cup c \leq 0)$$ because RHS is more general, i.e. when it doesn't happen, we have $a<b\cap c>0$, in which we cannot have $a\geq b+c$. Then, we just apply set rules: $$P(a\geq b+c)\leq P(a\geq b)+P(c\leq 0)-P(a\leq b\cap c\leq 0)\leq P(a\geq b)+P(c\leq 0)$$


0

Here is an example adapted from Statistical decision theory and Bayesian analysis by James O. Berger (Second edition page 29). Say that two species of wasps can be distinguished by the number of notches on the wings (call this $x$) and by the number of black rings around the abdomen. The distribution of the characters in the two species (labelled $H_0$ and $...


5

I liked the answer given by Dave harris. just though I would come at the problem from a "low risk" perspective, rather than profit maximising The random walk you are doing, assuming your fraction bet is $q$ and probability of winning $p=0.5$ has is given as $$Y_t|Y_{t-1}=(1-q+3qX_t)Y_{t-1}$$ where $X_t\sim Bernoulli(p)$. on average you have $$E(Y_t|Y_{t-1}) ...


18

This is a well-known problem. It is called a Kelly bet. The answer, by the way, is 1/3rd. It is equivalent to maximizing the log utility of wealth. Kelly began with taking time to infinity and then solving backward. Since you can always express returns in terms of continuous compounding, then you can also reverse the process and express it in logs. I ...


5

I don't think this is much different from the Martingale. In your case, there are no doubling bets, but the winning payout is 3x. I coded a "replica" of your tree. I run 10 simulations. In each simulation (trace), you start with 200 coins and try with the tree, 1 coin each time for 20,000 times. The only conditions that stop the simulation are bankruptcy ...


1

"How did they derive this?" This is called the posterior predictive distribution (ppd): \begin{align*} &p(x^{m+1}|x^{1}, x^{2}, ..., x^{m}) \\ &= \int p(x^{m+1}, \theta|x^{1}, x^{2}, ..., x^{m}) d\theta \tag{defn marginal dstn.}\\ &= \int p(x^{m+1} | \theta, x^{1}, x^{2}, ..., x^{m}) p(\theta|x^{1}, x^{2}, ..., x^{m}) d\theta \tag{defn cndtl ...


4

Problem statement Let $Y_t = \log_{10}(M_t)$ be the logarithm of the amount of money $M_t$ the gambler has at time $t$. Let $q$ be the fraction of money that the gambler is betting. Let $Y_0 = 1$ be the amount of money that the gambler starts with (ten dollars). Let $Y_L=-2$ be the amount of money where the gambler goes bankrupt (below 1 cent). For ...


3

In R you can obtain the result like this: # the data transformed to +/- values # this will give a different behaviour for dropping a # fixed effect term while keeping the interaction term a <- (0.5-(data$Athletes == 'S')) g <- (0.5-(data$Gender == 'M')) y <- data$Anger_Expr # linear model m <- lm(y~a*g) # the sum of squares by ...


2

This is an unbalanced design. That is, you do not have the same number of replicates in each of the four cells. In Minitab, the 'Balanced ANOVA' procedure (correctly) shows an error because of the imbalance. Below is output from the general linear model procedure in Minitab 17, which handles unbalanced designs. Analysis of Variance Source DF ...


1

Is the distinction between model parameters and hyper-parameters only about reducing the complexity of the problem or are there implications for the 'model quality' to be considered? Any time an unobserved variable enters into a statistical model, you have the choice either to estimated this variable from the data when fitting the model, or select its value ...


3

It is much easier to describe the Brier score in terms of what it actually is: $$ BS = \sum_{i=1}^n (Y_i - \hat{Y}_i)^2$$ It's quite intuitive, and writing the expression out consumes very little text. We rarely talk about how important it is to cut out unnecessary notation. If you must have notation, I wouldn't agree with what you've written out. An ...


1

I think your understanding of the issue is generally fine and that to some degree the use of the term hyper-parameter reflects informal conventions rather than strict distinctions. In that sense, informally, I think of hyper-parameters as specifying the algorithm (e.g. how many learners, how many basis functions, how much shrinkage, etc.) To quote Bishop's ...


1

To add something: Wether the algorithm converges or not also depends on your stop criterion. If you stop the algorithm once the cluster assignments do not change any more, then you can actually prove that the algorithm does not necessarily converge. Provided that the cluster assignment does not have a deterministic tie breaker in case multiple centroids ...


2

You maybe need to consider some intermediate steps to understand what is going on, as these are more or less just the consequences algebraic equalities: Let us use ${\bar{x}_N}$ for the sample mean of $x_1,x_2,\ldots,x_N$. As @MartijnWeterings mentioned, under the right conditions ${\bar{x}_N} \to \mu$. In the first case we have $$ \begin{align}\frac{1}{...


0

Assuming that both sample have equal sample size and equal standard deviation I would say that this is possible. The problem is that the sample sizes can't be equal since df= n1 + n2 - 2 in an independent t-test and you have df=17 and thus a sample size of 19 in two groups, meaning the groups are not equal. Anyway, I will proceed as if the sample sizes were ...


3

I don't think this question has a definitive answer, but it sure looks like a school-term pattern to me. x <- read.csv("multiTimeline.csv",stringsAsFactors=FALSE,skip=1) x0 <- as.numeric(x[,2]) ## extract counts xx <- ts(x0,frequency=12) ## convert to time series ss <- stl(xx, s.window="periodic") ## seasonal decomposition seas <- ss$...


0

I think this might be how to think of it : Rewrite the concentration inequality as $$ \mathbb{P} \bigg( \lvert X - E[X] \rvert \geq t \sigma C_4^\frac{1}{4} \bigg) \leq \frac{1}{t^4} $$ then $$ \mathbb{P} \bigg( \lvert X - E[X] \rvert \geq \eta^{-\frac{1}{4}} \sigma C_4^\frac{1}{4} \bigg) \leq \eta $$ then if you removed the $\eta$-quantile, the ...


Top 50 recent answers are included