instruction
stringlengths
9
38.7k
I have to forecast data with two seasonality with ARIMA. I find that I have to use a code like this: myForecaster <- function (parameters, training_df_set, testing_df_set, fourier_order = 3) { require(forecast) y <- msts(training_df_set$bikes_mean, seasonal.periods = c(parameters$seasonal_period_day, param...
Given a density $f$ (or given a $n$-sample $X_1, \ldots, X_n$ with density $f$), is there a way to create a $n'$-sample $X_{p,1}, \ldots, X_{p,n'}$ with density $f^p / \int f^p$, where $p \in \mathbb{N}, p > 1$?
I have a distribution over the finite set $\mathcal{A}$ where the probability mass function $p$ is: $$p(a) = \mathbb{P}(A=a) \quad \quad \quad \quad \quad \quad \text{for all } a \in \mathcal{A}.$$ Given observed data $\mathbf{a} = (a_1,...,a_n)$ the empirical mass function $q_\mathbf{a}$ is defined as: $$q_\mathbf{a}(...
I am finding a very hard time to visualize how the activation function actually manages to classify non-linearly separable training data sets. Why does the activation function (e.g tanh function) work for non-linear cases? What exactly happens mathematically when the activation function projects the input to output? W...
I am attempting to use a naïve Bayes classifier in python (using scikit-learn), with two examples. The first example has 6 classes and 2 hypotheses, the 2nd example has 2 classes and 6 hypotheses. Here's the code: from sklearn.naive_bayes import BernoulliNB as nb import numpy as np # Example 1: Single Bernoulli - 6...
I have read different descriptions of censored data: A) As explained in this thread, unquantified data below or above a certain threshold is censored. Unquantified means data is above or below a certain threshold but we do not know the exact value. Data is then marked at the low or high threshold value in the regressio...
I am trying to forecast a VAR model, which consists out of 5 variables with a monthly frequency. The problem is that the VAR model produces an unstable forecast and I am not sure what the source of nonstationarity might be. I checked for: unit roots timevarying variance multicollinearity structural breaks nothing is...
The issue has come up before, but I want to ask a specific question that will attempt to elicit an answer that will clarify (and classify) it: In "Poor Man's Asymptotics", one keeps a clear distinction between (a) a sequence of random variables that converges in probability to a constant as contrasted to (b) a ...
I've got what I think is a fairly basic problem. I'm not sure if it is a conceptual question or software question, but I'm fairly new to using R and these kinds of stats, so it could be either or both. I'm working on a practice problem with the occurence of a certain bird in fields with various combinations of two veg...
I am doing my first choice experiment with JMP & the tutorial I found at http://blogs.sas.com/content/jmp/2009/01/15/optimal-design-of-the-choice-experiment/ Right now I am not sure if I understood everything correct. The author describes how to do the parameterization for an attribute with 3 levels: "When there are ...
I am confused about how to approach sequence of random variables that are not identically distributed. For example, consider a sequence $X_1, X_2, \dots, X_n$ with the pdf: $$ f(X_n)= \begin{cases} (n-1)/2& \text{if }-1/n < x < 1/n\\ 1/n&\text{if }n < x < n+1 \\ 0 &\text{ otherwise} \end{cases} $$ How should i...
I am trying to understand the limits of permutation testing. I wrote up a small permutation test example in R, and found that permutation testing seems to fail when using absolute difference in variance as a test statistic between two samples, but works perfectly well when using standard deviation. By fail, I mean tha...
After doing a model comparison with my mixed lmer model, I have a model with three main effects, no interaction, say signal ~ factor A + factor B + factor C + (1|subj). Factor C has three levels, so I want to do a post-hoc test to see how the levels differ from each other. I tried two methods: Method 1: mcp with Tukey ...
In Kim et al. (1998) stochastic volatility model is specified as: $y_t=\beta\exp({\frac{h_t}{2}})\varepsilon_t,\quad t\geqslant1$ $h_{t+1}=\mu+\phi(h_t-\mu)+\sigma_\eta\eta_t$ $h_1\sim N(\mu,\frac{\sigma^2}{1-\phi^2})$ and $\varepsilon_t, \eta_t$ are independent standard normal. Later on they write (page 365) that it ...
I am trying to figure out how to calculate probability and odds for the variable Target. Target <- c(1,1,1,1,0,0,0,1,0,0,0,0,0,1,1) Treatment <- c(1,0,0,1,1,0,0,1,1,0,0,0,1,1,1) Method <- c('A','A','A','B','A','B','C','A','A','B','C','C','C','B','A') df <- data.frame(Target,Treatment,Method) As an example I would li...
Not a math/stats person, but I am interested in finding out why "paired t" would be a preferred test for samples that are not "independent". I googled a bit on this topic, but didn't really find anything that proves paired-t better than Student t for paired samples. Similar questions have been asked on this forum, so I...
The throwing of a one or two is called a success. The six dice are thrown together 64 times and the frequencies of the throws with 0, 1, 2,..., 6 successes are summed over all six pairs are as follows: Success: 0 1 2 3 4 5 6 Frequency: 0 4 19 15 17 7 2 (a)What would be the theo...
I have to use p-value test to compare two classifiers. I am getting the error vectors of 2 hypothesis and I am using their difference as an input in ttest function of MATLAB [H,p] = ttest(error,'Tail','both'); I am getting H as 0 and p as 0.34 As far as I read, this means that we cannot reject null hypothesis in this...
I’m trying to calculate the variance of a function of two discrete independent functions. The first function is $f(x)$ which has the property that: $$\Bbb{P}(f(x)) =\begin{cases} 0.243 & \text{for}\ f(x)=0 \\ 0.306 & \text{for}\ f(x)=1 \\ 0.285 & \text{for}\ f(x)=2 \\0.139 & \text{for}\ f(x)=3 \\0.028 & \text{for}\ f(...
I am plotting error bars in ggplot2 with geom_bar and geom_errorbar. geom_errorbar asks for ymin and ymax aesthetics. If I want the error bars to be std errors, is the convention to have ymax = mean_value + standard_error and ymin = mean_value - standard_error, or is it ymax = mean_value + (1/2)*standard_error and simi...
Are boxplots by default unable to produce the whiskers when there are just 2 values being input? I am working with dataset rufi and the values input are 0.939425 and 0.734522222. The boxplot command yields only the box without the whiskers. The box has the upper edge as the max value and the lower edge as the minimum v...
I'm fairly new to forecasting but I find all of this quote fascinating and hope to learn something from all of you. I have 500 observations and I'm tasked with the following: "compute recursive (expanding window) in-sample one-step ahead forecasts and recursive (expanding window) out-of-sample one-step ahead forecasts....
In a homework problem, I am given a Poisson distribution with $\lambda = 1$ as null hypothesis, $\lambda$ greater than or equal to 2 as an alternate hypothesis, and 3 as a test statistic. I am instructed to reject the null hypothesis if I observe that test statistic. We are describing traffic accidents in the problem, ...
My experiment has the response variable F the experimental unit is a cage the Treatment is rear (1/2 get standard rear & 1/2 get non-standard rear) and there are multiple measures of F over 12 days making this more complicated is that there what I think are blocks? the experimental unit is a cage into which 12 groups ...
I'm a beginner in statistics with limited knowledge. I'm reading up on neural networks to predict outputs using inputs. I understand that a neural network has to be trained to produce the Least mean squared error from the desired output. What does it mean by training correlation coefficient?
I need you assistance with finding the right model to analyze longitudinal data with a single group. My data comes from the ophthalmic field, i.e. eyes. I have n subjects. For each subject, one eye was chosen by random, and some treatment was applied to reduce the pressure inside the eye (a continuous scale). The seco...
I am trying to analyze the Berkeley Guidance Study to practice multiple regression models, which has 10 continuous variables, 1 categorical variable (with two categories) and the response variable. After trying to fit several models (using Minitab), I have some general questions and my current thoughts: Since there is...
Field explains how to analyse repeated-measures data using linear mixed-effect models (LME). See Field et al., Discovering Statistics Using R, 2012, p. 573. However, the way he specifies the model, there appears to be only one observation per level of the grouping factors. Is this a mistake in the textbook? If not, why...
I'm trying to compute TFP by using levpet Stata command. I use revenue estimation, yet it requires proxy option which is intermediate input (usually material resources used for goods/services production (as far as I understand)). Unfortunately, I don't have this data as is in my table. And other authors when referring ...
I'm not really sure where to begin with this but for a simplified example I have a set of integers: {11, 22, 3, 12, 1, 23, 21, 13, 2} I need to partition these into K=3 clusters with initial means of the clusters of 1,2,3 using Euclidean distances. I'm assuming I need to find the distance of each value and compute...
I'm trying to play with the breast cancer data available through UCI: https://archive.ics.uci.edu/ml/machine-learning-databases/breast-cancer-wisconsin/wdbc.data When trying to classify the data through Weka using J48 decision tree, I'm noticing that the J48 algorithm is disables maybe because it can't handle continuou...
I am fitting a weibull distribution to some data. Let us say we have the data in warpbreaks, that is, warpbreaks$breaks in R. My code is as follows: #Weibull distribution #f(x) = (a/b) (x/b)^(a-1) exp(- (x/b)^a) #shape= a and scale= b ll.weibull<-function(dat,par){ a=exp(par[1]) b=exp(par[2]) ll=-sum(dweibull(d...
I am analyzing some eeg waveforms and developing a classifier based on them. In the data I have, I usually find a strong peak at a very low frequency (I am not interested in this peak) followed by another peak at a higher frequency (call it f0) and I have a hunch that there is a shift in f0 between the two classes that...
Suppose that a study is being done on all families with one, two, or three children. Let the outcomes of the study be the genders of the children in descending order of their age. List the sample space. This my solution: {M, F, MF, FM, MM, FF, MFM, MMF, FMM, MFF,FFM, FMF, FFF, MMM} I am not sure because there could be...
I am currently working on my thesis and interested in estimating a multilevel differential item functioning model and I using at WinBUGS. Until I had done model check-up, there are no errors. However, when I tried to "update" the sample, suddenly the trap message said "undefined real result" popped up. What am I doing ...
I'm trying to predict the probability distribution of $Y$ given $X_0, X_1, ...$ with a nonlinear regression. The probability distribution of $Y$ is likely not normal. So far, I've set up and trained a regression model (support vector regression - SVR) which outputs the average value of $Y$, but I'm interested in seeing...
I'm trying to design an experiment to validate simulation software that I'm using. For talking purposes, let's say I'm testing seven different designs, A, B, C, D, E, F, and G. The seven different designs will be ranked according to a particular performance parameter that will be tested for both in real life and using ...
I want to use a risk score (RS) as an instrument for an exposure on a clinical outcome. However, I wont have access to data on the outcome for some time, and wish to examine whether this risk score would serve as a decent instrument. It is advised to report both the R-squared (as amount of variance explained by RS) and...
I have a question on verifying the central limit theorem using R. the question was to use data generated from different statistical distribution n see if the sample means follow normal distribution . iam starting with a sample of size rchisq(20, 20) and then increasing the number of my samples by 5 in each interval. i...
Could anyone point me to a good metric to distinguish between the following distributions? One distribution seems to be exponential type whereas the other is fatter and sometimes also has a peak around 16Hz. Type 1 Type 2 Given an unlabelled distribution, how to classify it as type 1 or type 2?
I need to solve the following problem. Let $X$ be a normal random variable with mean $\mu$ and standard deviation $\sigma$ and let $I$, independent of $X$, be such that $\mathbb{P}(I = 2) = \mathbb{P}(I = -2) = 0.5$. Let $Y = I X$. In words, $Y$ is equally likely to be either $2X$ or $–2X$. a) Are $X$ and $Y$ indepen...
I am preparing for midterm exam and need to know what is the step by step solution to this question? Answer is shown in red. Also any external related link is very much appreciated.
I was given the following equation: $$\sigma_{it} = \beta_0 + \beta_1 x_i + \beta_2y_i + \beta_3vs_{it} + \beta_4vm_{it} + \sum_{i=1} \gamma_i \alpha_i + \sum_{t=1} \omega_t \phi_t + \epsilon_{it}$$ with $\phi_t$ as a vector of time fixed-effects and $\alpha_i$ as a vector of individual fixed effects. My question is ...
I am modelling house prices against sales amount using a simple linear regression model. My SPEC (Option in SAS) says IID (p-value > 0.05) but my DW (Option in SAS) says a strong 1st order autocorrelation (DW<2). How can this happen? I have included the result screenshot Thank you!
I am interested in the relationship between children's success in high school and their mother's educational attainment. For this reason, I would like to create a variable called mom_education, which would be assigned to every member of each household. I am sure this can be accomplished, but my Stata skills are insuff...
I have a sample of $N$ instances of a problem (assumed to be independent samples of an infinite population of instances). To each of these instances I apply $M$ methods, and record how quickly they "solve" the instance. The questions I want to answer, in general, is which is the best method (shortest time)? My initial ...
I'm a programmer and currently trying to apply the Latent Dirichlet Allocation algorithm by Blei et al. on a text mining problem. I am using a library called gensim for this, which takes, among others, a vector of alpha values as parameters - the same $\alpha$ values that determine the Dirichlet distribution. So, if we...
I am trying to understand how I can organize the following data since none of what I learned in my undergrad econometrics course works. I am running out of ideas. I am trying to measure how the impact of a construction boom affects rural migration into the city. The two equations I have tried estimating so far are:...
The Theil-Sen estimator is of interest to me, however when I implement it myself I end up with something that scales as O(n^2). According to wikipedia, it can be calculated exactly in O(n log(n)). Can someone point me toward an efficient implementation (python or mathematica would be best, Matlab or R would be tolerabl...
I have a set of data that I am using regression analyses on. All of the columns are numeric (as far as I can see) a mix of integers and reals. However, two of the columns are being read from the CSV as factors, not numeric. I can't see any reason for this. My first attempts at a regression were just to see how good eac...
I am trying to find the covariance of a compound distribution. Given $X=x$, where $X \sim \mathrm{Uniform}(0,1)$, $Y$ is (conditionally) normally distributed with mean $x$ and variance $x^2$. I used the law of iterative expectations to find that $$\begin{align*} E(Y) &= E(E(Y \mid X)) = E(X) = 1/2 \\ \end{align*}$$ $$\...
Suppose that a study is being done on all families with one, two, or three children. Let the outcomes of the study be the genders of the children in descending order of their age. A. List sample space: $M$ = Male $F$ = Female $$ \{M, F, MF, MM, FM, FF, MMM, MMF, MFM, MFF, FFF, FFM, FMF, FMM\} $$ B. Let $A$ be the event...
I am comparing the means of days between notification and diagnosis for 13 years, as I want to know if the mean days from 2013 is significantly different from the previous 12 years. I was thinking of using pairwise comparison with Dunnett's adjustment, but this method assumes that 2001 is my control, and I was wonderi...
In a study, an experimental drug was given to tt (treatment) group and placebo given to cc (control) group. Blood levels of (say) cholesterol were tested at baseline and after 3 months in each subject. Aim of the study is to determine if experimental drug has any significant effect on blood level, i.e. experimental dru...
If a predictor is almost the same as the criterion (different tests measuring same domain and they are both highly correlated) would that predictor be worth-including in the regression model? What if if yields the highest part correlation vs other predictors in the model?
The usual textbook treatment of adjusting for superfluous variables in OLS states that the estimator is still unbiased, but may have larger variance (see, for example, Greene, Econometric Analysis, 7th ed., p. 58). The other day I stumbled upon Judea Pearl's treatment of Simpson's Paradox and a nice webpage that simul...
I wish to normalize inputs parameters into [0 - 1] and fit into a neural network for training. I have done a simple normalization method - MinMax Question 1: if my inputs have negative values, do i need to increase each of the values by adding with the min negative value's absolute value? So there will not be any nega...
I have a database with several continuous variables measured in two times. I searched for a change in time in my dependent variables in this way: difJS<-lmer(JS~Time+(Time|id)+(Time|occupation),dat,REML=T) If I detect a significant fixed effect of Time I can say there is a change in time of JS (a confirm of this would ...
Suppose I have a mean-reverting AR(1) type process, $X_{t+1} = X_t + \theta(\mu - X_t) + \epsilon_t$ where $\theta > 0 $ and $\mathrm{Var}(\epsilon_t) = \sigma^2$. This process is clearly stationary. One can consider a geometric version of this, as $Y_{t+1} = Y_{t} + \theta(\mu - Y) + \epsilon_t$, and then $Z_t = \exp...
Why is it that backward selection/elimination as compared to forward selection of regressors, is often less adversely affected by the correlative structure of regressors?
Let's say I'm interested in the relationship between poverty (measured by some continuous variable) and different types of financial reforms (which are dummies). Given this does it make sense to consider that the variables (given their different types - continuous, dummies) could be cointegrated?
I'm trying to run a SVM regression on some data and I want to use ksvm from kernlab or svm from e1071. But the number and type of kernels available is too restrictive. So I'm thinking of writing my own kernel function. Let's assume I want to write the kernel for heavy-tailed RBF for which the formula is $$ K(x_i, x_j) ...
I'm working on a biological question, with species data derived from an external database, which has multiple response and predictor variables. As a result, I want to do multivariate regression across a phylogeny to empirically test if my response variables are significantly different in respect to my predictors. Pleas...
I'm analyzing a residual plot of the residuals vs the fitted values. I'm not quite sure how to interpret this plot since there looks like there is a pattern and the average is not actually zero. There are diagonal straight parallel lines. I'm working with several ordinal IV's. Any ideas?
Having data of a (putative) Poisson-Gamma process I am looking for a method to define the correct binsize for analysing my data. I need a certain range (!) of binsizes (for instance starting with binsize 1, 2 ...10) to do variance versus median plots because I want to measure P of the relationship $$ var(X)\sim E(X)...
Explanation of Data: I started with a data set where each user belong a specific group and their contribution to different domains. After multiple pivots and pre-processing attempts, I got my data in format where I can use it in a regression. user_id X0 X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12 X13 X14 X15 g...
I am running an experiment looking at brain volume changes in a rare disorder. We have a small number of patients (n = 8) but a large control group (n = 100). Some colleagues have suggested that a balanced group should be used, ie. selecting 8 control brains, but I find this counterintuitive. Doesn't it make more sense...
I am new to the concept of thresholding a variance-covariance matrix and am having trouble understanding the exact process. I am following Bickel and Levina (2008) in choosing a hard threshold. What troubles me is their equation number (3) for the threshold operator: $$ T_{s}(M) = [m_{ij}1(|m_{ij}| \ge s)] $$ My inte...
I have a set of data and want to know whether they fall in 1, 2 or 3 groups. I started exploring the question by using k-means in MATLAB. By just looking at the distance from the centroid of each cluster by eye it looks like I might have two clusters, but I would like to be able to back this up with some statistics. I...
I am learning to use HMM and I am trying to solve the following problem. There is a robot moving around the nodes in graph. The robot can move to adjacent nodes with certain probabilities. Each time the robot steps into a new "node", a (noisy) information about the node is generated. That is, I do not know the exact n...
When the text simply says that $X_i$ is a J-dimensional random variable, how do I know that it's supposed to have $1 \times j$ or $j \times 1$ dimension? An example where this matters is Cramer-Wald device, taken from my professor's notes: Let $\{X_i\}_{i=1}^n$ be a sample of J-dimensional random variables and let $...
Is it possible to overfit a logistic regression model? I saw a video saying that if my area under the ROC curve is higher than 95%, then its very likely to be over fitted, but is it possible to overfit a logistic regression model?
I am wondering if there exists such a method in machine learning that: Given a binary classification problem, for each person in the test set the person that most closely resembles this person in the training set acts as a donor for the value; either 0 or 1. Could someone show point me in a direction? Note: For instan...
I'm fitting a natural spline fit to some data points. I'd like to estimate the prediction error for the predicted value. In linear regression (I agree that natural spline is also a linear regression with a specific type of design matrix), we know: $\hat{\beta} = (X^T X)^{-1}X^TY \rightarrow \text{ assuming var(Y) = } \...
Say I have a large population of people who are randomly divided into a treatment group and a control group. Individuals from both groups regularly undergo event "x," which sometimes results in complication "y." For each individual one can calculate the fraction of "x" events that were complicated "y." What is the best...
I have seen in published literature (and posted on here) that the asymptotic relative efficiency of the Wilcoxon signed rank test is at least 0.864 when compared to the t test. I have also heard that this only applies to large samples, although some books don't mentioning this (what's with that?). Anyway, my question i...
Consider three samples, i.e. three different lists of numbers, A, B and C. The sample sizes of the respective samples might be different. How can I calculate the probability that a draw from sample A exceeds a draw from sample B given that a draw from sample A exceeds sample C? I am looking for an elegant an resource s...
Fitting a power law regression. What are the downsides of estimating α by maximising the R-squared of (a) the theoretical values output by the regression with the candidate α and (b) the empirical values the model is being fit to? Also, I estimated x_min using a modified Kolmogorov-Smirnov test for goodness of fit - is...
Let's say I have 300 restaurants that I want to compare to each other on the basis of a "similarity score". To try and determine similarity scores, I pick a reference restaurant and pick 3 other restaurants at random and ask a user "Which of these 3 restaurants is most similar to the reference restaurant?". The user se...
I am developing a Poisson-family glm model in R for a dataset that I have. This dataset has 650 entries with two measures of exposure. The model, though not that relevant to the question, is: $$\ln(E(y_i)) = \ln(\beta_1) + \beta_2 \ln(\text{exp}_1) + \beta_3 \ln(\text{exp}_2)$$ After developing the model in R using a P...
My understanding was that descriptive statistics quantitatively described features of a data sample, while inferential statistics made inferences about the populations from which samples were drawn. However, the wikipedia page for statistical inference states: For the most part, statistical inference makes proposition...
This question has no practical importance for me, but anyway: I am interested whether we can predict somehow one missing value in a correlation matrix. Obviously, classical regression modeling is not appropriate here. Is there any other way, how we can say something about missing correlation? In addition, does the answ...
Given a time-series of log-return of SP500, then to obtain the volatility process what should we do? Some people say that we need using the ARMA model to withdraw the residual series, then plug this residual series into the GARCH model to obtain the conditional variance process? Or directly plug the log-return process ...
How do I take the partial derivative of bivariate normal cdf and bivariate normal pdf with its arguments (i.e. $x_{1}$ ,$x_{2}$ , and $\rho$ in the following equations)? \begin{equation} y=\Phi(x_{1},x_{2},\rho) \end{equation} \begin{equation} z=\phi(x_{1},x_{2},\rho) \end{equation} where $x_{1}$ is normally distribut...
Alright, I am reading this book called "Bayesian Data Analysis" and it states this idea of being uniform in log of something which I don't have any clue what that might mean?? Example 1: Introduction of Dirichlet distribution as a conjugate for Multinomial distribution: $$p(\theta|\alpha) \propto \prod\limits_{j=1}^{k}...
I am creating some binary regressions and am wondering if I should be surprised by the size of the odds ratios. In this particular example, the dependent variable indicates whether a student can meet a specified target in a second language. The explanatory variables are age as a continuous covariate and a measure of l...
I have become aware that a group at a large corporation is developing an econometrics model to forecast sales of their product. They are using this model solely to estimate sales in specified stress test economic scenarios where they are given what the economic environment will be like, including real GDP contraction,...
Theory I have three data sets, let's call them A, B and C. These data sets contain the following variables: A = { x, A1, A2, ..., An } B = { B1, B2, ..., Bm } C = { A1, A2, B1, B2 } x is the dependent variable which I'd like to predict. As you can see, only the data set A contains x. A and B are disjoint. On the other...
If you have one control and four groups of patients with a non-normal small sample size, there are differences in these tests for a post-hoc analysis after Kruskal-Wallis?
To be more specific: Let the random variable X be distributed according to probability density function f(x). Then the pdf of Y=1/X is given by g(y)=1/y^2 f(1/y), see wikipedia. I wonder if there is any citable reference for that. Or is it common knowledge? I'm coming from a different field of mathematics and lack some...
I am working with two highly skewed Bernoulli distributions where 96-99+% of the samples are in the "false" category, and the rest are in the "true" category (sort of speak). I am looking for a two-sided test of difference of proportions between the two samples. I can often achieve 500+ "trues" and tens or hundreds of ...
I'm using the flexsurv package (in R) to fit an exponential distribution to the veteran dataset in survival. I'd like to estimate the rate parameter of the exponential distribution, as well as an estimate of the standard error of the MLE. Here's some code (and output): library(flexsurv) testPatients <- subset(vetera...
It is well known, that there are diffrent types of scales (see Wikipedia Level of measurement). In psycholinguistics there is Semantic Differential technique. It uses a scale (usually 5 or 7 grades) which type as ordinal or interval is being debated. As Wikipedia says, the majority think it is ordinal. But at the same ...
I am very new about statistics. So, please understand if my question is somewhat awkward, and please give me related any advice. I have some data set. X = 500 x 100 (500 observations x 100 predictor variables) Y = 500 x 1 (500 response variables) With that data, I first estimated mean square error (MSE) using Ridge me...
I'm stuck with this one. Let $X_1,...X_n$ be an i.i.d. sequence of random variables with CDF F. The empirical CDF of $X_i$ is defined $$ \hat F_n(x) = \frac{1}{n} \sum_{1 \leq i \leq n} I\{X_I \leq x \}. $$ Note that for $x \in \Re$, $\hat F_n(x) \xrightarrow{p} F(x)$. Also, define the smallest median of P as $$ \theta...
I understand what is K-fold cross validation, but what does balanced folds mean? I thought k-fold cross validation is balanced. What are the differences between the two?
A coin that comes up heads with probability $p$ is flipped $n$ consecutive times. What is the probability that starting with the first flip there are always more heads than tails that have appeared? I have seen hints that this is Bertrand's ballot problem in disguise . Here is my attempt: Let $X$ be the number of head...
In an election, candidate $A$ receives $n$ votes and candidate $B$ receives $m$ votes where $n>m$. The probability that $A$ is always ahead in the count of the votes is $\dfrac{n-m}{n+m}$. This is known as Bertrand's ballot theorem. A variation is to allow for ties. So for $n\geq m$ what is $P(A\text{ is never behind})...
I was going through this paper and reading some problem(lasso type) that was being solved using soft thresholding, but I didn't get how it was derived. Can anyone please provide some suggestions? I didn't get how $\mu = -c +S(c-b/a,\lambda/a)$ $f(\mu) = \frac{1}{2}a\mu^2 + b\mu + \lambda|c+\mu|)$\ $\underset{\mu}{\ope...
I want to compare two proportions, say $p_1$ and $p_2$. I want to test the null that $\pi_1 = \pi_2$ where $\pi_i$ is the true unknown proportion for sample $i$. The problem is that I do not know the sample size which underlies the calculation of $p_2$ and hence cannot use the standard two-sample, independent proportio...