instruction
stringlengths
9
38.7k
I am doing regularized logistic regression (elastic net) on a set of variables that have different ranges (i.e. one ranges from 0~1, another ranges from 2~6, another ranges in the hundreds, and some involves negative numbers as well). I understand that in a case like this where each variable has very different range of...
In unbiased data, RMSE and standard deviation is same? Let $x_{i}$ be your true value for the $i^{th}$ data point and $\hat{x}_{i}$ the estimated value. If we assume that the differences between the estimated and true values have mean zero (i.e. the $\hat{x}_{i}$ are distributed around $x_{i}$) (Unbiasd) follow a No...
A probability problem: In how many different ways can 5 people sit around a round table? Is the symmetry of the table important? Answer: If the symmetry of the table is not taken into account the number of possibilities is 5! = 120. In this case it would be the same as ordering people on a line. However if rotation sym...
The negative loglikelihood is as follows: $$\dfrac{nd}{2} \log 2\pi + \dfrac{n}{2} \log |\Sigma| + \dfrac{1}{2}\sum_{i=1}^n(x_i-\mu)^T\Sigma^{-1}(x_i-\mu) \tag{1}$$ If I take differentiation with respect to $\mu$ on $(x_i-\mu)^T\Sigma^{-1}(x_i-\mu)$, the result becomes as follows: $$2\Sigma^{-1}\mu - 2\Sigma^{-1} = 2\S...
I want to calculate confidence interval for relative difference using bootstrap. I have two sample $s_a$ and $s_b$ from two difference populations $P_A$ and $P_B$ respectively. I used relative difference to compare mean value of two samples from the following formula: $ relative\_difference = \frac{m_a -m_b}{\frac{m_a...
I'm trying to understand the implications of an intervention which is not randomly allocated in a quasi-experimental setting. The intervention is receiving a license for shale gas exploration in the UK. Receipt of licensure is based on certain characteristics, such as viability of shale gas development, population dens...
I have a data set with the amount of bicycle accidents and the year in which the bicycle accident occurred. I would like to see if there is a significant increase in the amount of bicycle accident per years and by which amount. I am doubting between Pearson's correlation and Spearman's Correlation. (Or should I use a l...
I am starting a mixed-model selection analysis with lme in R. But when I start to fit the full model: fullmodOver <- lme(rrF ~ Old_N_dep+Overstory_old+Altitude+MAT+MAP+EIV_R+EIV_F+Overstory_diff+SCA_old+SCA_diff, data = regdata, random = ~ 1|PlotNR, method = "REML") I get the following error: Error in na.fail.default...
I'm stydying In the Wikipedia page on Errors and Residuals, it is written that However, because of the behavior of the process of regression, the distributions of residuals at different data points (of the input variable) may vary even if the errors themselves are identically distributed. Concretely, in a linear regre...
This is real basic, but a question that is annoying me: $\Omega = \left \{ 1,2,3 \right \}$ $T = \left \{ \emptyset , \Omega , \left \{ 1,2 \right \}, \left \{ 2,3 \right \}, \left \{ 1,3 \right \}\right \}$ Is $T$ a sigma-field? Apparently the answer is no because $\left \{ 2,3 \right \}^{c} = \{1\}$ and $\{1\}\noti...
Can you explain why the confidence interval of binomial distribution shrinks with the number of successes terms? n <- 100 res <- vector(length = n) for ( i in 1:n) { p <- binom.test(i, 1000, conf.level = 0.95, alternative = "two.sided") res[i] <- diff(p$conf.int) } plot(res, type = "l", ylim=c(0, 0.09)) grid() For...
When I read the paper by Neal, 'MCMC using Hamiltonian dynamics, https://arxiv.org/pdf/1206.1901.pdf In page 4, final paragraph, it says 'The reversibility of Hamiltonian dynamics is important for showing that MCMC updates that use the dynamics leave the desired distribution invariant, since this is most easily proved...
How would you compare error metrics of a multiple output regression? Normalised mean square error for each variable? How about for the overall performance of the model, would you just take the mean value of the NMSE for each variable?
Suppose you have a system of 2 servers with service times exponentially distributed with service rate $\mu_1 =2$ jobs/s and $\mu_2= 4$ jobs/s. Whenever a job arrives in the system, it is served from one of the available servers. If both servers are available, the faster server is chosen with q probability. If both serv...
Let's say cor(A,B) > 0 and cor(B,C)>0. What can we say about cor(A,C)? So, I am reasoning this way, if A is increasing, B is increasing, since the correlation is >0. Same holds between B and C, i.e. when B increases then C increases. So according to my logic, cor(A,C)>0. So what's wrong with my intuition? An explana...
I am conducting analysis to determine what attracts FDI (foreign direct investment) flows into 3 different states for the period of 1996 - 2015. I have multiple independent variables for each of these states for the mentioned period. I have combined the 3 data sets together. I am intending to run one multiple linear re...
I'm working on a model to predict the probability of (very) rare events. Out of 900.000 rows, only around 1000 are "positive" events, and the correlation between variables and outcome is not strong (i.e. the probability of a positive outcome is always < 0.5%) I'm using logistic regression to predict the probability of ...
For a task on data cleaning and analysis using SPSS I have two research questions for which I should pick an appropriate statistical test. It's been over a few years though since my last statistics course and I feel like some sources are contradicting each other. The analysis is done on a set of 5000 women giving birth...
I wish to conduct factor analysis on data that I have. The data is collected from a questionnaire and contains different types of data, for example, there are answers to the following questions: What is your age? (Number) What is your gender? (4 - Female, 5 - Male) Which country are you from? (Number - different number...
Trying to know the steps to find the maximum likelihood estimate for the covariance matrix, assuming normal probability distribution, I want to differentiate log-likelihood function but what confuses me is that in the equation, shouldn't $l(\mu, \Sigma^{-1})$ be written as $l(\mu, \Sigma)$? How come $ \Sigma $ can be w...
According to Lutkepohl (2005) autocovariance matrix for VAR(1) case is given by \begin{equation} \begin{aligned} \Gamma_y(h) &= E(y_t - \mu)(y_{t-h} - \mu)' \\ &= \lim_{n\to\infty}\sum_{i=0}^{n}\sum_{j=0}^{n}A_1^iE(u_{t-i}u'_{t-h-j})(A_1^j)' \\ &= \lim_{n\to\infty}\sum_{i=0}^{n}A_1^{h+i}\Sigma_u(A_1^i)' \\ &= \sum_{i=...
I have 3 classes: A, B and C, and I want to assign different weights to them when computing my loss. I.e. At a later stage when I am making decisions using the model and some probability threshold, taking action on false positives in class A and B are harmful, while that is not the case for class C. Is there any way to...
is it okay to cluster documents by learned document vectors?. I think similar documents should have similar vectors. from this fact it is okay to cluster documents using for instance k-means. However, i could not find good resource for this. Thanks!
I am trying to understand what neural nets have in common with multiple linear regressions. Is is correct that every node in every layer (not counting the input layer) is just a multiple regression with the variables being the nodes in the preceding layer? I've included a picture to show what I mean. How is this unders...
The algorithm, used to optimize the likelihood function in a generalized linear model (GLM) such as poisson regression, is iterated weighted least square (IWLS), where the Newton-Raphson algorithm is used. The single Newton-Raphson update is: $$ \begin{aligned} \beta^{new} &= \beta^{old} - (\frac{\partial^{2} L}{\par...
Below is the structure of the data, ProductID|Region|ProdRangeID|Brand|numberofstores|holi|Season|promo|Week|sales 1111 1 aa3a x 100 1 0.5 0 35 100 1111 1 aa3a x 100 0 0.5 0 36 100 1111 2 aa3a x 100 ...
I am doing an experiment to have an estimation of False Discovery Rate (FDR). Let we have 5000 samples from a normal population and we assume this is close enough to present the population. Next, we sample 10 observations from this population and run a test, $H_0:\mu_{pop}=\mu_{sample}$ versus $H_1:\mu_{pop}\neq\mu_{sa...
library(GoFKernel) x<-seq(0,1000,33) f <- function(x) pbeta(x, shape1=2, shape2=3) f.inv <- inverse(f,lower=0,upper=1) f.inv(.5) [1] 0.3857168 I don't understand the result of the Code. When I imagine the inverse function of pbeta, then on the $x$-axis are the probabilities and on the $y$-axis are the val...
Say I have one PDF given by $$ f(r) = \begin{cases} \frac{3 r^{2}}{8}, \text{if } 0 \leq r \leq 2\\ 0\text{, otherwise} \end{cases} $$ describing the distribution of a continuous random variable $R$ due to, for example, some external reasons, and another one given by $$ g(r) = \begin{cases} \frac{r}{2}, \text{if }...
I am examining the relationship between a training dosage and subsequent efficacy, and comparing the relationship between a treatment (coded 1) and a control group (coded 0). In a related earlier post -gung provided a nicely detailed explanation of how OLS uses a loss function to yield a line of best fit. Similarly, -...
I was reading an article and I saw the following sentence: For a given martingale, if it has an upper or a lower bound, then the martingale must converge (a.s.). Since the likelihood is always nonnegative, 0 is a lower bound. What does "a.s." stand for? Is it a common usage? My guess is "asymptotically" but I'd l...
I've been asked to perform a statistical analysis at my work and report on the results. I'm using a 2-sided t-test comparing 2 groups where H0=0 and Ha≠0 at a significance level of .05. For my results my point estimate is .01 and my 95% CI is [-.05, .06]. Clearly my decision is to fail to reject the null and report tha...
I am constructing a random forest model to predict a dependent variable Y. Two features are X_1 and X_2. However, from domain knowledge, I suspect that X_1 and X_2 don't strongly predict Y on their own, and the feature that really matters is the ratio X_1/X_2. (There are many other features X_i as well.) For example, s...
I want to construct a design to use Choice Based Conjoint Analysis. I want to focus on D-Optimality, for that reason I use the R package AlgDesign which uses Fedorov Algorithm. I create 7 attributes with 4,5,15,20,2,3,3 levels each one respectively. library("AlgDesign") levels.design = c(4,5,15,20,2,3,3) f.design <- g...
I am currently reading the paper "Exploiting Similarities among Languages for Machine Translation" by Mikolov et al. (available here : https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/44931.pdf) and I was wondering why they used the cosine similarity to find the closest word to z (page 4,...
I am trying to follow the original paper on nCRP by Blei et al., 2010 and am confused with it's implementation. The authors describe the analogy for an nCRP as follows: A tourist arrives at the city for an culinary vacation.On the first evening, he enters the root Chinese restaurant and selects a table using the CRP d...
http://archive.ics.uci.edu/ml/datasets/Wine+Quality I'm using this data set for a regression analysis project. Right now, I'm using free sulfur dioxide as my response, but the problem is, sulfur dioxide is often added by the winemaker during the wine-making process, so I'm not sure if this is a good response variable t...
I know there are already two questions on this topic, but neither has an answer. I have a set of $N$ experiments. For each experiment, denoted by a vector of predictors $\mathbf{x}$, I measure $m$ values $y(f_1)\dots y(f_m)$ of a quantity $y$ at increasing frequency values. In other words, the result of each experime...
$X_n$ assumes the values $1 , \frac{1}{2} , \frac{1}{3}, \ldots, \frac{1}{n}$. with equal probability . Examine whether $X_n$ converges in probability to some constant? This is what I tried : $\mathrm{E}(X_n) = \frac{1}{n}\sum_{k=1}^{n}\left(\frac{1}{k}\right)$, here I am confused how to solve limit $n \to \infty$ on ...
I am trying to tie out the confidence intervals of the 124.88 intercept on page 8 here: http://www.econ.uiuc.edu/~roger/research/rq/vig.pdf Here is the code: #here you can see the 124.88 number library(quantreg) data(engel) engel data.frame(percentile = c(.05,.25,.5,.75,.95), coef = cbind( coef( rq(foodexp~income,t...
Consider a scenario in which I use a deep neural network to output Y given X (this can also be an encoder-decoder pair: X->Y). If I have a method to convert Y->X (known technique, let's call the output X'), can I learn from this by comparing X' with X? That is, without any additional data, can I tune my neural network ...
A student ran a binomial regression (in SPSS) on an experiment to determine if dusting rodents with Delta Dust reduced flea load on the animals. There are data from two years. The model analyzed by treatment, age, sex, treatment by year, and area. She would like to make a graph for presence of fleas in treated and cont...
I have performed a linear regression to predict Olympic medal count from Population and GDP for year 2008, 2012 and 2016 I have been asked to explain how consistent the effects of Population and GDP are, over time. I understand that I am meant to look at the coefficients estimate for GDP and Population. Am I simply me...
I'm building a auto loan probability of default model where the loan term could be 3 to 7 years and hence default can happen anytime in that interval. But we are a start-up and have only 3 years of historical/performance data. What techniques can i use to effectively build a PD model. Should i use synthetic data? I'm l...
I have two variables, output and number of hours worked. I want to predict how many hours we need to spend for a certain output. First i tried a regression analysis but unfortunately there is no correlation between these two variables. Is there another way to predict the production output based on the hours spent? Can ...
I'm using keras to build to CNN to train the famous SVHN (street view house number) data set(fist version, without cropping). I train the pictures as they all have five digit spot, for pictures have less numbers, I treat the empty spot as another category. So, I have 11 categories for each digit spot. I didn't use bbox...
What happens when a text classifier using a bag-of-words model (let's say we're using logistic regression) encounters a word that the model has not seen before- aka, words that were not in the training data? How would it handle or treat these extra features? The reason this confuses me is that usually samples that we ...
I seek a correlation between 2 columns, X and Y. X is a continuous variable Y is an integer, but most of its values are zero I have several hundred rows of data for the two columns. The Pearson correlation coefficient between them is understandably low. However, is there another type of correlation that I can use ...
I am trying to build different predictive models using electronic health records. As they have missing values (between 0.5-18% missing values in each feature) I executed multiple imputation using MICE (the R package mice), taking into account van Buurens et al. recommendations and instructions. As the final step in MI...
I'm working on a tool to automatically analyze survey results. The tool builds contingency tables and conducts statistical tests on them. When the questions have categorical (nominal) answer choices (e.g. "Eggs", "Waffles", "Pancakes"), I first conduct a chi-squared test of independence and then do a post hoc analysis ...
I'm want to apply PCA to the kaggle's Titanic dataset For now I'm just taking the columns that have numeric values and dropping the NaN values, So I have five variables, actually four if we ignore the depending variable ('Survived'). I have this loaded into a DataFrame df, if I took five components using PCA: pca_mode...
I read a paper where the authors factorized a conditional probability as follows: $P(a|b, c)\propto P(a|b)P(a|c)$. They say that they can do that because $b$ and $c$ are causally independent (they are using graphical models), and cite the paper [1] to justify this. Under which assumptions can this be true? Honestly, I...
If I have a system that may fail by one of two events. The probability of the system to fail due to the first event is 3/5; whereas the probability of the system to fail by the second event is 4/5. what is the probability of the system to fail? I know that shall be 3/5 + 4/5 (I think) but I want the value to be less t...
Is it true that Bayesian methods don't overfit? (I saw some papers and tutorials making this claim) For example, if we apply a Gaussian Process to MNIST (handwritten digit classification), but only show it a single sample, will it revert to the prior distribution for any inputs different from that single sample, howeve...
I've seen a number of references to a "solve-the-equation" approach (or method, etc) to choose a kernel density estimation (KDE) bandwidth, but different papers use different citations, and none of them seem to give a pedagogical explanation for this, or the origin of the term. For example one paper refers to Sheather ...
If I follow the algorithm at here: http://www.ece.northwestern.edu/~wkliao/Kmeans/index.html Suppose I am unlucky. When I randomly pick the initial cluster centers, two of the initial cluster centers are from two data points that should belong to the same true cluster, called A. In this case, can the algorithm give inc...
this question follows on from a question I asked yesterday Testing whether the variance of a data set is significant which you guys were really helpful in making me realise my intentions for the data were impossible. So now I'm trying to figure out what I'm doing with them and wondered if you guys can help me out again...
Could someone please confirm for me that the "Example Code" below is a one-step ahead forecast? The reason I ask is because I'm a little confused by the out-of-sample forecast in the Rob Hyndman blog link below. If someone could please explain the difference, besides that one uses ets and the other auto.arima, I'd be...
Are there "higher-n" versions of a binomial distribution? Like trinomial, quadrinomial, etc? Specifically, I am interested in the likelihood of how incoming events stack up. I have 4 "bins" of type A, and one "bin" of type B. Each incoming item is sorted into a bin with a given likelihood. (2/9 for each A and 1/9 for B...
I saw a pretty interesting claim: Suppose you estimate a regression with only dummy's and a intercept as explanatory variables (sample size is 288): $\hat{y_{i}} = \hat{\beta_{1}} + \hat{\beta_{2}}D_{1i} + ... + \hat{\beta_{11}}{D_{11i}}$ Some of the $\hat\beta$'s are individually significant, others not. The claim in ...
I understand how we get 3.5 as the expected value for rolling a fair 6-sided die. But intuitively, I can expect each face with equal chance of 1/6. So shouldn't the expected value of rolling a die be either of the number between 1-6 with equal probability? In other words, when asked the question 'what's the expecte...
Is there a way to find the time it will take a component to fail if we know the average failure time. For example a bulb has a mean failure time of 100 hours but is working even after 200 hours. Can i say at what time it will fail? I dont have any others statistics like distribution etc.
Suppose $X,Y$ are independent $N(1,1)$. How can I calculate $P(2-X<Y<X)$?
I want to find the most statistically distinct phrases in texts across different classes, where the texts have already been classified. Suppose I have ~100,000 short text documents, where each document has a label. Let's say I have 100,000 text messages labeled with the gender of the author (male or female). I want to ...
I am trying to apply log-log in a marketing mix model. The dependent variable is sales, among the independent variables, one is holiday, it is dummy variable, the value is either 1(yes), or 0 (no). Another variable is competitor spend, sometimes, the value is 0. I want to use a log-log model in R. But how can deal wit...
When I read the talk notes by Owen about empirical likelihood, http://www.ms.uky.edu/~mai/sta709/Owen2005.pdf I am confused about the solve of solution when I read the page 24. Let's say we want to get the maximum value of $\sum_{i=1}^n \log(n w_i)$ with the constrained condition, to solve the optimisation problem, we ...
I'm trying to make sense of the following sentence from introduction "Multiple discoveries: Distribution of roots of determinantal equations" http://statweb.stanford.edu/~ckirby/ted/papers/2007_MultipleDiscoveries.pdf "The distribution of the squares of the canonical correlations when the population canonical correlati...
Exactly as the title asks. Suppose I have a discrete distribution of which the only thing I know about it is the mean $\mu$ and variance $\sigma^2$. What would be the notation to describe this? Is there something that is commonly used that is similar to the normal distribution?
I am trying to do sentiment analysis using Naive Bayes and have a doubt regarding log. While calculating posterior probability in Naive Bayes classifier, we apply log to prevent underflows and very small values. My question is that when applying log, $\log(p(x|Y=C)$, do we have to apply log separately to numerator and ...
Let's say we have i.i.d. normal distributions $Z_1, ..., Z_n$. For some nonzero constants $a_1, \cdots, a_n$ and $b_1, \cdots, b_n$, let $$X = a_{1}Z_{1} + \cdots + a_{n}Z_{n}\\ Y = b_{1}Z_{1} + \cdots + b_{n}Z_{n}$$ If $X$, $Y$have covariance zero, are $X$ and $Y$ necessarily independent?
I have a soil nutrient dataset of 60 plots from three different soil types divided per three depths. I did a one way ANOVA for every nutrient at the first depth and I got nice results in which I can see some nutrients changing among soil types and some other no. Now I would like to get a significance value for differe...
I have a chemical engineering background but I have decided to go into the corporate world instead of industry. I now work in payment streams and have been doing data science and optimizations. What I found use of was a distance matrix of entities and then doing clustering. I am now looking for similar matrix operation...
I'm trying to calculate the Mahalanobis Distance (to check for outliers) in SPSS for a scale of 25 items. When I use the Regression function and save the Mahalanobis Distance values, everything seems to run correctly and MOST of my cases will have an MD value of some sort. About 10% of my cases do not (the cells are si...
In a paper from 1936, Harold Hotelling (access on JSTOR) defined the concepts of canonical correlations and canonical variates for two sets of variates. In pages 327 and 328, he precisely derives these two concepts with an algebraic perspective. In page 328, he deduces that if one set has more variables than the other ...
Consider a set of $p$ stationary correlated time signals of identical duration $T$. I would like to de-correlate them by projection on an orthogonal basis but preserving stationarity. Without the stationarity constraint, a principal component analysis would produce the desired basis. I figure that a functional principa...
I have a data set of N points, n X variables plus Y variable. $$ (x^{(i)}_1,...,x^{(i)}_n,Y^{(i)}),\,\,\,\,i = 1,...,N $$ generated by a mixture of $k$ linear dependencies; with this, I mean that there exist $k$ vectors of coefficients $$ a(j) = (a(j)_1,...,a(j)_n),\,\,\,\,j = 1,...,k $$ such that for each $i$, there e...
I am trying to get a feel for the relative merits and drawbacks, as well as different application domains of these two MCMC schemes. When would you use which and why? When might one fail but the other not (e.g. where is HMC applicable but SMC not, and vice versa) Could one, very naively granted, put a measure of uti...
I was just recently wondering how to solve this problem: I have a set of experiments which I did by myself and I analyzed the data and ran the statistical tests (Mann-whitney test). Analysing the raw data you can clearly see that there is absolutely no difference between the groups or this difference is so minimal that...
I am using R. I have two data sets. The first one is generated with rnorm(), the second one is created manually. Histogram of the first set is here and Shapiro-Wilk (shapiro.test()) returns p-value 0.189, which is expected. > shapiro.test(d) Shapiro-Wilk normality test data: d W = 0.96785, p-value = 0.189 The ...
I've read what they mean on a technical level, but I'm trying to build intuition related to a specific problem. So I have some data, a set of measurements. It's pretty curvy, looking like a cross between a norma and a gamma maybe. I do a qqplot of it with a normal distribution. The qqplot looks reasonably linear, it ha...
I would like to check the proportionality assumption of a proportional hazards model. The problem is that I am doing multiple imputation. I have checked the assumption in every one of the imputed data set. If the assumption is violated in only one imputation, does it means the assumption is rejected? Is it reasonable t...
I have conducted a research testing the associations between vitamin D, CRP, C3, and insulin resistance. The design was a case-control design. the sample size was 134, of which 67 are cases (obese) and 67 are controls (normal weight). of note, each group contains 35 females and 32 males. The Journal which i intended to...
I’m running a regression to test the stock market in Sweden. In essence, I have made a categorization of two types of buys and two types of Sells. Then I have divided the sample containing all trades over time into small, medium, and large size firms and run the same regression on the different samples. When I regress...
Aren't they both calculated the same way? Is the difference then only that rate looks at past events for a period of time vs. probability predicts the possibility of future events?
Conduct both a parametric and a non-parametric test for the median value of 80. Are the results from both the tests similar? My code is: Ins <- diabetes$Insulin tstat <- median(Ins) f1 <- function() { x <- rnorm(length(Ins), mean = 80, sd = sd(Ins)) return(median(x)) } sdist <- replicate(10000, f1()) plot(d...
I have simple question, what is the difference when you use total and percentages when calculating correlation ? For example I want to calculate correlation between Europeans born in USA in each state every year (here I have total amount of people, and percentage of people) and average number of people who change work ...
I would like to predict a binary output based on borrower's informations in a bank credit demand/file. My problem is that this file can be filled either by a single borrower (celibate) or 2 borrowers (couple) My dataset looks like this: nb_of_B | B1_Info1 | ... | B1_InfoN | B2_Info1 | ... | B2_InfoN (B means Borrowe...
I am visualizing average biological parameters (i.e., weights, lengths, age, condition, etc.) over time (specifically across years) using geom_boxplot in ggplot in R. I have also fit a trend line through each data set using a linear model (specifically using + geom_smooth(method = "lm") and a spline using stat_smooth.A...
How can I get P(B|A) based on P(A) and P(B)?
In understanding the proof of Basu's thereorem, from wikipedia, I could not understand a few steps. Here's the wiki page. The link to the page. I do not understand the following. We are not making any assumptions on the probability density function. Hence, what does $P_\theta$ and $P$ represent individually? This als...
In my study, we investigated the effect of sex and location on fish length taken from 3 different regions: A,B, C. From each site we randomly took 10 females and 10 males. Now I am going to test whether sex and/or region affect fish length. I am not really sure which method should I take to analyse my data. 2 way ANOVA...
The marginal likelihood (or Bayes factor) method to perform model comparison, based on $\Pr(\text{data}|\text{model})$, assumes that the true model is the model set (closed world assumption). What happens when the true model is not in the model set? I assume that the method would report a high Bayes factor aka posterio...
Simple question. I have a rv $X$ whose mean and variance I know but am interested in the true distribution, $P(X \le a)$ which I do not know. So I resort to sampling $X$. I do this $N$ times and create a approximate pmf for $X$. I want to know how "good" this is. How do I quantify this? Okay, more realistically I am i...
If I have data regarding advertising traffic (number of impressions displayed), revenue from these impressions, browser, country, device, etc., what kind of statistical test can I apply? I want to be able to say, for example, that traffic from country a is more valuable than traffic from country b, or traffic from mobi...
I want to see if there is a difference in tenure between low performers and high performers. I am using R and I did an ANOVA to test the difference with this code: fit <- aov(Tenure ~ Perf2016, data=df) summary(fit) Tenure is a continuous variable and Perf2016 is a dichotomous variable. I want to calculate Cohen's D ...
I am working on a hypothesis test and need to separate a group of people into a control and a test group. What is the best way to calculate that, if I have N people?
I have an HMM (picture below), with a single parameter $\theta$ I want to estimate using Baum-Welch. I have a single training example X="HHT", and I start with an arbitrary guess $\theta = 0.8$. I know how to use the forward-backward algorithm to build the $A$ matrix with the expected number of transitions, e.g. $A(Fai...
I'm trying to find a function which describes one data set. I've tried to create a model by function lm() like this: Call: lm(formula = time ~ I(1/nprocs) + I(1/nprocs):ndoms + nDOF:ndoms + I(nDOF^2):ndoms, data = dataFact) Residuals: Min 1Q Median 3Q Max -0.33075 -0.05145 0.00782 0.05...
Background - I'm trying to follow section 7.2.4 in this EM tutorial. Basically the setup is I have a vector with 10 points $x$, and each of them can be assigned ($y$) to either Gaussian 1 or to Gaussian 2, and I want to estimate the parameters $\theta$ = (mean, std) of both Gaussians and assign which point belongs to w...
I have the following data which I am trying to get a nice simple regression fit to it: Looks simple enough, but using R's nls function and trying both a power (ax^b+c) and an exponential (ab^x) fits I get very poor fits (red line is the power regression result and green line is the exponential result): I've tried ...