instruction
stringlengths
9
38.7k
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...
If I win the bet I get 200 dollars and my winning probability is 0.1 and if I lose I give 20 dollars. Should I take the bet?
I wish to automatically (not by visual inspection) detect where large deviations occur in a residual plot from a regression. For example, suppose I have the residual plot below: I want to automatically detect the observations from about 30:35 deviate from a normal residual pattern. Some clues are that the magnitude i...
I have 17 patients who underwent cervical plating, I have calculated preoperative cervical measurements like angles at certain level to be operated, total cervical angles same parameters calculated after operation same parameters calculated after 2 years of operation Now, which test should I use, and in case it is...
I am running a 2x2x5 mixed factorial ANCOVA, with one within-groups variable, and two between groups variable. I want to check for violation of homogeneity of regression slopes. My covatiate does not interact with my between groups variables. It does however interact with my within-groups variable. Is this still a v...
A definition before I start: A trajectory $t$ of length $n$ is here defined as a series of 2D coordinates $$\{(x_1,y_1), (x_2, y_2),..., (x_n, y_n)\}$$ Now I have a set comprised of such trajectories denoted by set $T=\{t_1, t_2,...,t_n\}$. Take $t_1$ and $t_2$ as an example: let's say a segment of $t_1$ denoted by ...
I am fitting curves to my data to extract one parameter. However, I am unsure what the certainty of that parameter is and how I would calculate / express its $95$% confidence interval. Say for a dataset containing data that exponentially decays, I fit a curve to each dataset. Then the information I want to extract is ...
I have a specific question about random selection, representativeness and inference. It is well known that it's necessary to use random selection to get representative samples from the population of interest. But what happens with non-random samples? I am working with an intentional sample. I compared the means of som...
Given you had a large dataset of people with a name and country. How would you calculate an estimate of the origin country from one of the names? If i looked up a name, Kim and just averaged the rows from each country, it seems to me that my numbers would be skewed since the dataset might contain a lot more names from ...
Are there any literature concerning what in-sample or out-sample period i should choose and how long the window should be when i consider a "moving window forecast"
In the following code I perform a logistic regression on grouped data using glm and "by hand" using mle2. Why does the logLik function in R give me a log likelihood logLik(fit.glm)=-2.336 that is different than the one logLik(fit.ml)=-5.514 I get by hand? library(bbmle) #successes in first column, failures in second ...
I am currently reading "Bayesian Data Analysis" by Gelman et al. and my main goal was to learn about Hierarchical modelling on chapter 5. I read until chapter 4 and the book is written terribly for a taste of a math student as it is pretty sketchy and engineering oriented. I decided to not to continue anymore with thi...
(This question is from my pattern recognition course.) There is this exercise: Imagine we have $N$ samples with $n$ dimensions. First it asks to find a point $m$ where the summation of Euclidean distances from $m$ is minimum. Then imagine another vector $e$ with size of 1. $e$ passes from $m$. Every point on this line...
I had an intervention with control group and experimental group. Both groups had pre- and post-tests. So I was using 4 graphs to explain in a presentation. (pre-test control, pre-test experiment & post-test control and post-test experiment) Each graph showed responses to a likert scale question with 5 options. One of ...
I've got a tricky document classification question. Each document in my collection can be assigned a label. In my training set the average is about 3 different labels assigned to each document. What I have learned in the training set is $P(\text{label}|\text{doc_word})$ for many label/doc_word pairs. I want to calc...
Let $X$ & $Y$ be random vectors. Let $Z$=$f(X,Y)$ be a random variable. Then if $X$ & $Y$ are independent, the following is a well known result: $P(f(X,Y)\in B\mid Y=y)$ = $P(f(X,y)\in B)$ I need some help to 'formalize' what appears to be an intuitive generalization when $X$ & $Y$ are not assumed to be independent, n...
I am playing around with SP500 data from the MASS package. From observation of the ACF and PACF there seem to be no significant autocorrelation. Now I want to model the volatility of the returns but I also want a mean equation. I'm not sure how I will get my mean equation as the ACF and PACF suggest that I can't use MA...
I am working on a data set of intertidal organisms and am looking for a multivariate technique that will help me determine why some groups have different species assemblages than others. I was thinking multivariate analysis of covariance (MANCOVA) might be a good method because it takes care of the experimental design ...
Suppose I have a random variable X which can take integer values 0 through 99. It can be, for example, numbers written on balls in a large urn. I have three hypotheses about the distribution of these numbers on the balls: $H_0$ says each number is just as likely as every other number; $H_1$ says that there's a 90% chan...
I have the following problem: Formulate the likelihood function, the log-likelihood function, and the maximum-likelihood estimate as well as the Fisher information and the observed Fisher information for each of the following problems. c) $X_i,\dots,X_n \overset{\mathrm{i.i.d}}{\sim} \mathcal{N}(\theta,\theta^2)$ d) $X...
I know that the Kaplan-Meier estimator is biased because my textbook says so. However, I don't understand why the following proof doesn't work: Let $\hat{S}(t)$ be the Kaplan-Meier estimate for the survival function $S(t)\equiv P(T_i > t)$ where $T_i$ are iid failure times. Let $\hat{\Lambda}(u)$ be the Nelson-Aalen es...
I have an independent sample $x_1 \ldots x_N$, identically distributed. I make an empirical CDF as $P_{\mathrm{emp}}(x)=\sum\limits_{i=1}^N H(x-x_i)$, where $H(x)$ is a Heaviside step function. Then I make an interpolation of the raw CDF as $$P_{\mathrm{interpolated}}(x) = \frac{P_{\mathrm{emp}}(x_{i+1}) - P_{\mathrm{e...
I am using regression tree for this educational exercise. I have 500 observation points of independent variables $X$ and dependent variable $Y$. I use 400 points to generate my model and keep 100 points for out of sample (OOS) testing. I then, use the model to predict new Y (Y_predicted) for OOS data. I then, obtain R-...
The first method to test for the day of the week effect is OLS regression. This method has been used by many empirical researchers testing for a day of the week effect. I am struggling to understand how the sum of the lagged values of the return equation being added removes autocorrelation from the error term.
I am about to start out analysis of a microbiological data set (ETEC: enterotoxic echerichia coli in children with diarrhea). The variables refer to the ETEC, not to the children. Some of the variables, like colonization factors (CF), may have none, one or multiple values; thus CF becomes a multiple-valued variable. ...
I have results from 5 surveys each 2 years apart and let us assume that no subjects are selected in more than one survey. The sampling method used in these surveys are biased and I have sampling weights calculated(with respect to the population) for each data point in each study. The question is, how would I be able to...
Sometimes a less true model predicts better than a truer model (When will a less true model predict better than a truer model?). So should I choose a less true model over the truer model if it predicts better and my purpose is prediction? Similarly, should I choose a model which violates the assumptions (e.g normality ...
I'd appreciate any help on the following problem: Let $X_1, X_2, \dots, X_N$ be i.i.d. continuous random variables with support $[0, 1]$. What is a reasonable bound on the probability that some pair of random variables is less than $\epsilon$ apart? Mathematically, I'd like to find some $\delta$ not too large such that...
I have a time series data for shipment with following variables: Year: 2008, 2009, 2010, 2011, 2012, 2013 Month: jan, feb, ..., dec Number of ordering days Shipment Volume I want to know the effect of the number of ordering days on the shipment volume. Can this can be done using regression method? If so, should I con...
Consider a univariate normal model with mean $µ$ and variance $τ$ . Suppose we use a Beta(2,2) prior for $µ$ (somehow we know µ is between zero and one) and a $log-normal(1,10)$ prior for $τ$ (recall that if a random variable $X$ is $log-normal(m,v)$ then $log X$ is $N(m,v))$. Assume a priori that $µ$ and $τ$ are indep...
In a (Bayesian in my case) inference, all observations do not contribute equally to the results. Some of them drive substantially the results while others have only negligible effects. When studying hierarchical models it is sometimes difficult to identify which data belong to the first class and to the second class. I...
If we have the tables of conditionals $p(x|y)$ and $p(y|x)$, how can we calculate the joint probability $p(x, y)$? (Let us assume $x$ and $y$ are binary variables). Using these tables, how can we calculate the covariance of $x$ and $y$? Covariance of two variables are calculated using $E[xy]-E[x]E[y]$, but I am not sur...
Why does the Okun's law, the one that measures the relationship between unemployment rate and GDP, regress the percentage change in GDP on change in unemployment rate? Why cannot we just simply regress GDP on unemployment rate? What is the statistical difference between the two approaches?
I have been working with fuzzy logic (FL) for years and I know there are differences between FL and probability specially concerning the way FL deals with uncertainty. However, I would like to ask what more differences exist between FL and probability? In other words, if I deal with probabilities (fusing information, a...
I'm building a logit model using R and I'm getting a result of 88.9% of accuracy (verified using the ROC [in rattle, evaluation tab] using 30% of my 34k dataset). What kind of tests would be interesting to do to certify myself that it's a good model?
I have an experiment where I'd like to determine if a coin is biased. I'm using the binomial distribution to look at coin flips. I've collected data from a sample of 30 flips and found that in 24 of the flips, the outcome was heads. I would like to calculate the power of this experiment. Here I am interested in only a...
I have seen that expected value of a discrete random variable is equal to the arithmetic mean of the distribution provided the values it takes. Is it true for all random variables irrespective of the distribution? Is there a case or example where expected value differs from the arithmetic mean? Secondly I think it app...
I am trying to understand over-fitting. I am using a regression tree method in Matlab. The given sample size is 500, which I divide into a training set of 400 and a test set of 100. I create the model for the training set and get a corresponding $R^2$ of about 84%. i.e. the in-sample $R^2$ is 84%. When I use the model ...
When do we calculate the population parameter instead of sample statistics? If there is a this kind of case which statistical tool should we use population parameter or sample statistics? A car company wants to know the average age of cars of their brand that are still on the road. How would you define the appropriate...
Consider the autoregressive model, $\left[ \begin{array}{l} y^{\ast}_t\\ x_t^{\ast} \end{array} \right] = \left[ \begin{array}{l} a_{11}\\ a_{21} \end{array} \begin{array}{l} a_{12}\\ a_{22} \end{array} \right] \left[ \begin{array}{l} y^{\ast}_{t - 1}\\ x^{\ast}_{t - 1} \end{array} \right] + \text{} \l...
I read in many books or notes online that (1)volatile series do not differ significantly from white noise and that (2)their squared values will exhibit correlation. Although I agree with (2), I can't seem to agree with (1). I used the tsdisplay function from forecast package to plot the acf of SP500(MASS) and bmw(evir)...
I'm having trouble deriving the PDF for the following problem (from the book Doing Bayesian analysis with R and BUGS): Consider a spinner of the kind often found with board games, but with a log10 scale from 1 to 100 (covering 0 to 360 deg). The spinner is fair, so any value is equally likely. What is the pdf at poi...
My problem: Let $X_1,\dots,X_n \overset{\mathrm{i.i.d}}{\sim} \mathrm{Cauchy}(\theta,1)$ and suppose we want to estimate the location parameter $\theta$. Find the log-likelihood function of the given random sample and show that the maximum likelihood (ML) estimator is solution of an equation of degree $2n - 1$ i...
I have a random variable X. set.seed(1) X <- rnorm(10,0,30) I would like to generate three other variables (y1, y2, y3) that have a pre-specified R^2 of .50, .36 and .26. i.e: cor(x,cbind(y1,y2,y3))^2=0.5,0.36,0.26 and also the coefficients for a linear model where y1 y2 and y3 are regressed on X return: 0.4, 0.25 and...
Cohen's $d$ measures the difference between the mean for the experimental group and the control group divided by standard deviation. The Cohen's $d$ statistic produces something that does not add any value to the observed effect-size i.e. the difference between the mean for the experimental group and the mean of contr...
I have collected data to estimate a parameter and am now puzzled about how to generate confidence intervals: Setup: 1) We have a bag with $N$ coins. 2) Each coin $i \in N$ has a known probability of $q_i$ for being picked from the bag. 3) Each coin $i \in N$ has an unknown probability $p_i$ of showing heads when it is...
On page 10 of this paper the author states that In this section, I use monthly Fama and MacBeth (1973) logit regression [...] to examine the type of forecast. My question(s) are: what does this mean, is it even remotely justified by the typical conditions making normal Fama-MacBeth procedure (namely, that asset ...
I just went through the following work http://epublications.bond.edu.au/cgi/viewcontent.cgi?article=1199&context=ijbf (mirror) and was wondering what is the difference between model (9) on page 12 which models volatility as a function of past volatility and past error and model (10) which is the GARCH(1,1) model. Both...
The standard error of an estimator is defined as the square root of the the estimator variance (or mean squared error, MSE, for unbiased estimators). More specifically, if we wanted to get the standard error of the sample mean $\bar{X}$, we would divide the variance of the sample used to calculate $\bar{X}$ by the squa...
After learning about a few machine-learning models (NN, SVM, decision trees), I was wondering if these models are able to find inherent relationships when learning. For example, if I feed it two inputs A and B, but it is really A - B or the percent change from A to B that determines the output (but this relationship is...
Background: I have conducted some testing on a random sample of n=20 parts. The data is variable and I know nothing about the population statistics. I would like to use the data from this sample to make statements about the population (in particular, I would like to say with 95% confidence that the 99th percentile of...
What is the best way or steps to calculate the moment generating function (mgf) of (1+sum of gamma distribution) over gamma distributions? Is it the same way to derive beta distributions? I am trying to find the mgf of $$\exp[-(1+\sum X_j)/Y]$$ where $X$ are gamma distributions that have the same scale factor, say $m,$...
So I have the following question from my textbook, the answer I get is slightly different from the book's answer, which I think may be wrong, could someone please confirm? Question: Suppose $y_{1:T} = (y_1, y_2, \cdots, y_T)'$ is a sample of $T = 20$ Poisson random variables such that: $y_t|\theta_1 \stackrel{i.i.d}{\...
I saw almost each regression method corresponds to a classification method. for example, adaboost classification, adaboost regression. What is the relationship between them? Can I get a regression method from a classification method immediately?
I have observations taken with different sensitivity thresholds and minimum detection levels, i.e. Lab A is less sensitive and has a minimum detection level of .2 and Lab B is more sensitive and has a minimum detection level of .02. Edit 2: I have taken $N$ samples and have had them processed by two different labs (fo...
Assume a game wherein a character's "power" is made up of several factors, like speed, weight, body build, etc. And let's say that each of these factors were scored 0, 1, 2 wherein 0 means average, 1 means slightly above average, and 2 means above average. If there were, say, 5 factors that affected power, it means the...
I am measuring two unpaired variables $x$ and $y$ in two different conditions ($x$ and $y$ are magnitudes of some special magnetic signals). In the first condition, my hypothesis is that $\bar{x} > \bar{y}$ and in the second condition that $\bar{x} < \bar{y}$. Now that I have $N$ samples from both variables, how can I ...
I have a Dirichlet distribution from which I'm maximizing $\alpha$ by calculating the log likelihood with the following equation $p\left(s|\alpha\right) = \sum\limits_{i=1}^O\log\left(\frac{n_i!}{\prod\limits_{j=1}^kn_{ij}!}\frac{\Gamma\left(\alpha_0\right)}{\Gamma\left(\sum\limits_{j=1}^k\left(n_{ij}+a_j\right)\right)...
I'm wondering when it is possible to distinguish between a data generating process that is missing at random (MAR) vs one that is not missing at random (NMAR) by analyzing a directed acyclic graph (DAG). For example, suppose we have the following: $$ \begin{matrix} T& \longrightarrow & Y \\ \downarrow & & \\ R_{Y} ...
I'm trying to determine the effects of four treatments on flowers on the volume of nectar available to pollinators. Problem is, I have about 50% zero volumes across treatment categories. What is the best approach to comparing mean volumes between treatments?
How exactly does the value of $C$ relate across different kernels that we can use for SVMs? As in, how does it vary when changing the polynomial degree of a kernel or while using a Gaussian kernel?
Problem setup One of the first toy problems I wanted to apply PyMC to is nonparametric clustering: given some data, model it as a Gaussian mixture, and learn the number of clusters and each cluster's mean and covariance. Most of what I know about this method comes from video lectures by Michael Jordan and Yee Whye Teh,...
I am trying to integrate the following function over $x$ and $g$: $f(z)= \int_{a/z}^{d} \int_{a}^{zg} \frac{e^{-(g-\mu)^2/2\sigma^2}}{x^{2/3+1}} dx~dg$ When I integrate over $x$ I get: $f(z)= 3 \int_{a/z}^{d} {e^{-(g-\mu)^2/2\sigma^2}}((gz)^{-2/3}-a^{-2/3})dg$ After re-arrangement we get two terms, one of the is easy t...
I'm struggling to extract F-values and/or p-values from an ANOVA with all random effects or an ANOVA with both mixed and random effects. I would expect to be able to get F- and p-values regarding the variance of the random effects based on the expected mean squares. Maybe the aov() function just doesn't return what I'...
I'm trying to calculate Asymptotic Standard Error (ASE) for Somer's D measure of association for some population data. The formula for variation (sd^2) I've found (in the article specified below) is: (this is identical with equations presented in "Analysis of Ordinal Categorical Data" by Alan Agresti) I've tried to i...
I have some data which I wish to cluster. I would like to see how these clusters compare to the categories that have already been assigned. Is there some kind of metric or visualisation that will tell me how well these line up? Any suggestions with each item assigned to just one category is fine, but each data element...
I work in a company that gathers work environment surveys. When a survey is done we create reports that are handed out to the managers in the company to show where they need to focus their efforts and such. In these reports we show a comparison of the variance of the calculated group compared to the variance of a refer...
In an application, I deal will a large number of images from which I successively extract particular values to compute their means and variances. Because storing them all would mean storing Gigas, I'd like to store only things that would allow me to compute the global means and variances. What do I have to store?
When playing a bit with a live linear regression visualization at http://www.geogebratube.org/student/m28709 I noticed that point at the ends of the X range have a large influence on the slope of the regression line. Is there an accepted way to give weights depending on the X coordinate to reduce the influence of possi...
I am using around 200 variables to compare 2 populations, group A and group B. Here's a representation of what the data looks like Var1 VarA VarT Var3 group 2 0.56 10 152 A 3 0.43 11 187 A 5 0.25 15 149 A 7 0.12 12 132 A 2 0.78 ...
Lets say we extract all the ngrams (unigrams, bigrams, trigrams) along with their frequency from a text. Now if we want to select say some Top K ngrams, is there a way to estimate a good value of K using Zipf's law ? e.g. if Ngrams are -> w1:10, w2:9, w3:9, w4:8, w5:5, w6:3, w7:1, w8:1, w9:1, w10:1. Here are Ngrams are...
I have two time series data sets which contain hourly-intervalled, monthly, and yearly household electricity consumption in kWh. One data set is produced by a simulation, the other gathered from the real-world. My aim is to validate the simulated output by using the data gathered from the real-world. I want to measure ...
I am having some problem in computing SVD and PCA in Matlab. I do not know if I am doing theoretical mistakes or programming mistakes. Starting with a data matrix $X$, PCA computes the eigenvalues $\lambda_i$ of the covariance matrix $X^TX/(n-1)$. On the other side SVD of $X$ is given by $X=U\Sigma V^\top$, and so $$X...
I am trying to plot the predicting line for a GLM with proportional data. After having troubles with the example from "Crawley" I found this link: Problems plotting GLM data of binomial proportional data My data consists out of 3 columns: Altitude, number of beetles and number of other insects. I want to investigate th...
I have several nonlinear curves of the transmission spectrum of a semiconductor. I got a fit to each of the curve. To get the chi squared for each my teacher gave me the formula $$\chi^2=\sum_{i=1}^{N}\frac{(T_{exp}-T_{fit})^2}{N\sigma^2_{exp}} $$ where $$\sigma_{exp}=\sum_{i=1}^{N}\frac{\sigma_{i}}{N}.$$ However, read...
What's a good measure of spread in a multidimensional space? In a single dimension variance would be the measure I need, but in a multidimensional space I need more than just variances. Note that in a single dimension, I need something different than the range covered by the data points. Consider a hypercube representi...
How can I describe descriptive statistics for a dummy variable (gender of worker in a shop)? Let's say this is the info that I have: mean : 0.47 median : 0 max : 1 min : 0 std. dev : 0.4998 skewness : 0.101 kurtosis : 1.01 jarque bera : 85.67 probability : 0 I know that so...