instruction
stringlengths
9
38.7k
My statistic knowledge only goes so far as to understand those basic statistic terms, instead of applying them, yet this is a questions on applying statistic knowledge into real world case. For statistic terms like Mean, Median, & Mode etc, my knowledge only limits to a simple distribution like this: However, from hi...
This is a very basic question, but I find myself constantly frustrated with the same questions as I review regression results and read statistics forums. The question is whether or not some sort of software or automated approach exists to determine: 1) Which type of regression to run. For example, based on the distri...
I have a multiple regression equation that predicts a trait of interest ($y$) from two measured traits ($x_1$ and $x_2$). I want to measure $x_1$ and $x_2$ for $k$ individuals of a certain plant species, and use this regression to estimate the mean and standard error of $y$ for this species. I know the standard error ...
The various control char constants are usually given for various population sizes, often up to 25. I'd like to have more flexibility; is there à way to compute those instead? Thanks
I have to estimate the error of a 1D array. The usual way of doing this to take the SD of it and square it. The issue is the following: The values in the array represent the time series of the intensity of a source. Whilst the source is mostly quiescent, there are times for which the source becomes active (the values ...
I'm trying to study Boltzmann machines, so I don't undestand this recurrent formulation for the training stage of the weights $w$: $\Delta w_{ij} = E_{data} (v_i h_j ) − E_{model} (v_i h_j )$ all references tell that $E_{data}$ is the expectation observed in the training set while $E_{model}$ is "that same expectation...
I am trying to fit a model with variable x, and y. plot(x, y) shows that it is convex (downward) and decaying which makes me think I need to make a log transformation of y, but plot(x, log(y)) is still convex, even more plot(x, log(log(y))), plot(x, log(log(log(y)))) are also convex, what kind of model should I fit to ...
I am running a logistic regression with two fixed effects. I am including random subject and item intercepts. I am not including random item slopes because my items can only belong to one level of the fixed effects. A model with random subject slopes for each of the fixed effects fails to converge. Models with only ...
This question extends from two separate questions for an assignment, namely question 1 and question 2. I apologize for asking variations of questions for the same problem, but I am experiencing confusion consolidating the concepts of ANOVA. After carrying out an ANOVA, I produced a table showing the analysis of varian...
How can I determine if $\ y_t = c_1 +c_2t +u_t$ is stationary? $\ c_1$ and $\ c_2 $ are known constants and $\ u_t $ is a white noise process with variance $\sigma^2 $. I do not understand the role of the t. Am I right to describe this as a trend stationary process? How can I show the mean of the moving average?
I am working on a UCI repository's data set. I tried implementing a decision tree in the R programming language using the caret package. trctrl <- trainControl(method = "repeatedcv", number = 10, repeats = 3) set.seed(3333) dtree_fit <- train(V7 ~., data = training, method = "rpart", trControl = trc...
I am looking for an algorithm to cluster elements of which I already know pairs that are not in the same cluster. Take the following matrix. The values in the cells represent a score of closeness (the higher the closer). A negative value indicates that the elements cannot be in the same cluster. - a b c d e a - ...
I am looking for websites, books, lecture notes, or research papers to learn about VARs. At the moment I have no knowledge of them. I would greatly appreciate any advice.
What is the best practice for choosing the feature selection algorithm? Should I try all of them and check their performance? I'd like to know if there are some situations where one is usually better than the other, depending on the problem and the dataset nature.
library(rpart) library(rpart.plot) library(rattle) tree <- rpart(lm(Sepal.Length ~ Sepal.Width + Petal.Width, data = iris)) fancyRpartPlot((tree)) From my understanding, rpart fits a regression model at each partition of the tree. Since my outcome is continuous, the number at the top of each box is the averaged val...
I am looking for advice/input on how to report results from a beta regression output. My data is bound between 0 and 1, as ratios, and I am looking at a simple relationship between the response variable (D_Ratio), and predictor (body length, or BL) variable which is continuous. I used the betareg function from the beta...
I am studying behaviour of particulate matters(pm10) concentration in respose to change in rain and tempretaure. my data was not normaly distributed so i have to transform data I did log transformation and inverse transformation.The Adjusted R-squared for log transformation is :0.07918 and Adjusted R-squared for invers...
I am trying to extend a univariate model to a multivariate one within MCMCglmm. Multiple (some correlated) traits were assessed for a number of individuals whose mothers are known (i.e. we know half sib families). There is replication of the families (not the individuals), however due to processing constraints, some re...
I was reading Chapter 4 (LDA) of the book Introduction to Statistical learning with R (http://www-bcf.usc.edu/~gareth/ISL/ISLR%20Sixth%20Printing.pdf) and could not understand the "coefficients of linear discriminants" part in the output of the lda() function from the MASS package. The example code is on page 161. Spec...
I'm conducting a study on how pregnancy weight gain affects risk of breast cancer and decided to go with a logistic regression model (outcome is yes/no for breast cancer) and my primary independent variable is categorical (<10lbs, 10-19 lbs, 30-39 lbs and >40 lbs each compared to the referent 20-29lbs). I've recently b...
I have some probability values which are all between 0.5 and 1. Is it possible for me to scale these values between 0 and 1 with the top 7% between 0.5 and 1 only being above 0.5 in the new scale?
I have a variable $Y$=Control=$C$ and three variables: Fraud := $F$ Error := $E$ Waste := $W$ all numerical variables. I am studying the effect of control methods on each of $F,E,W$, as well as on the combination of the three. To study the three efficiently variables simultaneously, I am then modeling $\frac{P(A)}{1...
I was going over the cifar 10 tutorial in tensorflow and was trying to understand why the guys in tensorflow/google decided to crop the images. The only reason I could justify it to myself is because they wanted to possibly decrease the computation time when training the neural net, otherwise it seems rather random. I...
Kline (2011) p249 writes: To identify a hierarchical CFA model, there must be at least three first-order factors. Otherwise, the direct effects of the second-order factor on the first-order factors or the disturbance variances may be underidentified. Each first-order factor should have at least two indicators....
When running an ANOVA we are told that certain assumptions of the test must be present for it to be applicable to the data. I never understood the reason as to why the following assumptions were necessary for the test to function: The variance of your dependent variable (residuals) should be equal in each cell of the ...
I was going through the cifar10 tutorial from tensorflow and was trying to understand how I can compare different learning algorithms and models with standard benchmarks in the context of data set augmentations. In vision its common to crop and apply further transformations to data sets as data augmentation. If the co...
I currently have that for $X_1, \ldots, X_n$ independent Bernoulli random variables with parameter $\frac{1}{i}$ random variables, $$ \frac{\sum_{i=1}^{n}(X_i-\frac{1}{i})}{\sqrt{\sum_{i=1}^{n}(\frac{1}{i}-\frac{1}{i^2})}} \to_{D} N(0,1) $$ This fact I established by Lyapunov's. How can I show that if $\sum_{i=1}^n\f...
I have just started Andrew Ng's Machine Learning course of which a legacy version is online. Here are the notes I am using, it is lecture two of the series on youtube too: https://see.stanford.edu/materials/aimlcs229/cs229-notes1.pdf (around page 5) He derives an equation for LMS/ gradient descent. I thought I underst...
This is a question that I have in order to reconcile a difference in terminology. In the linear regression setting, we have $y=\beta x + \theta$. Here, we call $x$ a variable. When we are trying to use this in a practical setting, suppose $x \in \mathbb{R}^n$. Then $x$ is represented as a feature vector. I think each f...
When monitoring the convergence of parallel MCMC chains, some people measure the autocorrelation length, others the Gelman-Rubin statistic. (There are others who use some other statistic and still others who don't bother with any, but let's ignore that here.) I have even been told to monitor both. I'm wondering how ...
In the TensorFlow documentation, it appears that the optimizer method "minimize" just takes a single step in the direction of the gradient (rather than doing this repeatedly until a local minimum is found). Is that terminology standard in machine learning? For example, the DDPG algorithm given in this paper contains ...
Suppose we have a sequence of random variables ${X_n}$, $$X_n\xrightarrow{a.s.}0$$ Prove this implies $$\frac{S_n}{n}\xrightarrow{a.s.}0$$ where $S_n=\sum_{k=1}^{n}X_k$. Any help would be appreciated. Thank you.
I had been reading this paper of multi-output gaussian processes. It is part of the literature review for a paper that I am writing. I download the software and was surprised that they are not using signals that are depending outputs between them. As soon I modified the functions to be dependent the algorithms do not w...
I performed t-SNE on a this small sparse matrix with 2 identical points: [[1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 1, 0, 1, 0, 1, 0], # [0, 0, 0, 1, 0, 1, 0, 1, 0], # [1, 1, 1, 1, 1, 1, 1, 1, 0], [1, 0, 1, 1, 1, 1, 1, 1, 1]] I expected these two points would still be identical in the 2 dimensional embedding but ...
Does knowing everything about your environment yield any major shortcuts to finding the optimal policy, in a Markov Decision Process with a very large (finite) number of states? Mere planning clearly requires less effort than reinforcement learning for smaller state spaces; in many cases we can just calculate the polic...
The following is the residuals vs predicted scatter plot for a regression model with two IVs. Initially, I thought it was evidence of heteroskedasticity. But, I reasoned that although there is a visible pattern in the plot, the variance across different levels of predicted values is same. To clear my doubts, I saved t...
My question revolves around the Central Limit Theorem. To read from the same page, I quickly state it here: Let $X_{1}, ..., X_{n}$ be IID with mean $\mu$ and variance $\sigma^2$. Let $\overline{X_{n}} = n^{-1} \sum_{i=1}^{n} X_{i}$. Then lets define $Z_{n} := {\frac{\sqrt{n}(\overline{X_{n}}-\mu)}{\sigma}} \rightarrow...
I am working on a survival analysis that looks at time-independent as well as time-dependent variables. I have been reading at length the use of time-dependent variables, which requires an Extended Cox Model. I have also stumbled upon the concept of repeated measures, so my first question: Which should I be using? Her...
What is the basic difference between Item based Collaborative Filtering and Market Based Analysis? Is the latter a specialised case of the former?
Objective Clarify how to choose the kernel reference points (landmarks) to identify the non-linear boundary. Background Going through SVM at Coursera ML - Support Vector Machine and trying to understand how to choose the landmarks to measure the distances to feed into the Gaussian Kernel. It says "put the landmarks...
I have a Financial Time Series from a database and intend to cluster the time series based on their similarity. How would it be different to cluster them based on their pairwise Correlation and cluster them using DTW. Which is recommended option between the two
I have extracted a set of features for a classification task and I used the SVM classifier. How can I find the top k predictive features and their discriminative power (chi square) value?
Given are n independently distributed binary vectors, each of dimension d. They are distributed according to: $X_{ij} ∼ ber(1 − θ), λ_{j} = 1$, $X_{ij} ∼ ber(θ), λ_{j} = 0$, for 1 ≤ j ≤ d and 1 ≤ i ≤ n where $λ_{j}$ selects the Bernoulli source. The likelihood has then the form: $p(X|\theta, \lambda)=\prod_{i=1}^{n}\pr...
Is it ok to use LRT (likelyhood ratio test) to compare two mixed-models that have the same number of degrees of freedom? They differ just by adding spatial restriction to one of them that is not changing amount of dfs. Ex Model 1- df 1206, logL = -296.78 Model 2 - df 1206, logL = -289.8 I used to do comparison like ...
Consider the problem of doing nonparametric density estimation using kernel density estimator in the common form $k(\frac{\textbf{x} - \mathbf{x_{j}}}{h})$, $k(\textbf{u}) = \begin{cases} 1 & \text{ if } |\mathbf{u_{i}}| \leq 0.5, i\in 1...d\\ 0 & \text{ otherwise } \end{cases}$. Given are the datasets: $D^+ = \{1,1....
This is the first time I've come across the term posterior "ordinate" and I'm not sure what it means. I understand what the posterior density of some model parameters given some data refers to, but this seems to be different. I came across it reading this paper: http://www.tandfonline.com/doi/abs/10.1198/01621450175033...
I obtained a model fit: Sales = 1020 -8.8*Price +2.1*online reputation after substituting the value of online reputation, I came out with following demand equation: 1036.8-8.8*Price Now to take out the revenue (sales*Price) I converted it to revenue function: 1036.8*Price - 8.8*Price^2 Now can I implement MAB for findi...
Just some clarification regarding the central limit theorem. I understand that the theorem says "Given a distribution with mean $\mu$ and variance $\sigma^2$, the sampling distribution of the mean approaches a normal distribution with mean $\mu$ and variance $\sigma^2/n$, as the sample size increases" I am unclear as ...
A train has got five train cars, each one with N seats. There are 150 passengers who randomly choose one of the cars. What is the probability that everyone will get a seat? I think that what is asking me is "what is the probability that each wagon is chosen by no more than N passengers"? The probability of having $n<N...
I have a sample of 347 subjects. While diagnosing the fitted regression model, I observed a minor bump (on the positive side) over the 45-degree line on the PP plot. When I conducted two of the formal tests available in SPSS, they rejected the null hypothesis that the data is from a normal distribution. The normality v...
I have the slope and intercept of my model as well as their respective standard error but not the data from which it was estimated (I retrieved it from the literature). I would like to plot the predictions a*x+b with the prediction interval around the curve, to know if my own data falls into it. Do I have enough inform...
Based on this paper by Lakens 2013, I understand there are two recommended ways for calculating Cohen's $d$ for within subjects measures.  Cohen's $d_{rm}$ (which assumes the correlation between measures is known) and can be calculated as: $$ \text{Cohen's }d_{rm}=( M_{diff}/\sqrt{(SD_1^2+SD_2^2-2*r*SD_1*SD_2})*\sqrt{...
In Bayesian analysis we use the Normal-Inverse Wishart distribution for the parameters of multivariate models these prior distributions have some hyperparameters. So how do we find the values of these hyperparameters to get Bayes estimates of the parameters? One way to specify these values as diffuse but for an infor...
In the paper UNITN: Training Deep Convolutional Neural Network for Twitter Sentiment Classification, as the name suggests, a CNN architecture for sentiment classification is being introduced: I am currently trying to reproduce these results but I am new to CNN hence I don't really understand a few basic things here. M...
New in R, using auto.arima function for forecasting. Here's the sample forecast I worked with ARIMA(2,0,0)(1,0,0)[12] with non-zero mean Coefficients: ar1 ar2 sar1 intercept 0.8301 -0.2038 0.5245 1785.9265 s.e. 0.1266 0.1252 0.1408 432.6884 sigma^2 estimated as 5...
I'm trying to implement th Local Coordinate System (LCS) of this paper. It's all clear to me about how it works, but the only thing that I' dont understand is the "rotation" mechanism. Quoting the paper (sect 4.2): This processing actually encompasses three distinct operations: centering (C), rotation with PCA basi...
I have some economic data - so very interdependent and complicated - from worldbank. It also has a lot of missing values. I normalized it so all features are approximately normal, zero centered and with variance of 1. I then filled the missing values with zeros - I tried some different ways of imputation, but that one ...
I've been looking at analysis of deviance tables of negative binomial models in R using the anova() function and can't work out why the figures for residual deviance don't agree with the figures given in summary(). For example, using the quine dataset in the MASS package, I fit two nested negative binomial models: quin...
I have a experimental setup (plant germination). I don't have concrete data yet. I am looking at how many plants germinate in given conditions, broken down as follows: 1) Two different temperatures. 2) For each of the two temperatures, I have 4 salinity concentrations. 3) For each salinity concentrations I have 2 level...
This is my problem: using R. I need to generate data from a time-series without storing the historical data since they could not be available in some cases, so my objective is to find a generic model from which create a dataset similar (considering the statistical properties and the behaviour) to the starting one and i...
I have a Customer feedback about quality of service of a bank. I have data Excel format : header row contains the question ans, the row below contains the response of the Customer. The responses can be textual (text responses), or numerical (scale rating). I plan to collect all the text responses and try to do a senti...
I am unsure whether turning count data into density still makes Poisson as the appropriate distribution for modelling. If a given response data are, for example, counts of animals, then such data are best modelled using a Poisson (or quasi-Poisson) distribution. If the response data are continuous (but bound by zero), ...
I am building a predictive model with 7 features. My target is binary. I have tried using XGBoost in R. bst <- xgboost(data = as.matrix(trainSet[,predictors]), label = trainSet[,outcomeName], max.depth=10, nround=1000, objective="reg:linear", verbose=0) pred <- predict(bst, as.matrix(test...
I have a dataset with a total of 58 samples. The dataset has two columns "measured_signals" and "people_in_area". Due to it, I am trying to train a Linear Regression model using python's Scikit-learn to predict from the measured_signals” the people in the area. The steps I do are the followings: I use “sklearn.cross_...
Consider the following state space model: the transition distribution of the latent variable $x_k$ along with the observational density is given below. Assume that both sequences of the noise terms, $\{{v_k}\}$ and $\{{w_k}\}$, are iid Gaussian. What is the probabilistic model of the observation equation $p(y_k|x_k)$? ...
This sounds like a standard question to me but I haven't found any answer so far, looking on a hundred sites. We have a time series (say >100 x and y values, x equidistant) representing a smooth curve plus gaussian noise. We want to estimate a) the smooth curve and b) its first and second derivatives. Currently we appl...
In my dataset I have cartoons, which are actually just sets of word tags. Those tasg come in two sub sets, one stands for the context of the cartoon and the other stands for the anomaly in it. An example - imagin a duck giving a presentation. The context tags could be - office, preserntation, seminar, workplace. An an...
I think someone can help me to solve this problem. I scanned 40 samples in order to obtain two parameters: BMD and TBS. I have performed a regression analysis in order to study the relationship between BMD (dependent variable) and TBS (indipendent variable). After that I have damaged the samples with a compression (me...
I've got $n$ observations of an object corresponding to $n$ readings; $$a_{1}, a_{2}, \ldots, a_{n}$$ where $p_{A}(a_{j})$ is the probability that observed object in reading $a_{j}$ is 'A'. Now, as all my readings are of the same thing, I would like to utilize all of them to find the probability that the thing I'm obse...
OSHA keeps records of fatal injuries in deaths per 100,000 full time equivalent workers. I'd like to see if improvement over time is significant from 2006 (3.7) to now (2.8). My instinct is to model this as a Poisson distribution for a population of a million full time workers, set lambda to 28 and the number of event...
I am getting some perplexing results for the correlation of a sum with a third variable when the two predictors are negatively correlated. What is causing these perplexing results? Example 1: Correlation between the sum of two variables and a third variable Consider formula 16.23 on page 427 of Guildford's 1965 text, ...
Firstly I should mention I am quite unfamiliar with the subject (operational risk). And I am also beginner in risk management. It is also worth to mention that this task is on academic level . I intend to create something called yearly Aggregated Loss Distribution (also known as Loss Distribution Approach or LDA). It s...
With the right choice of the penalty, the ridge estimator in the linear regression model $$y=X \beta +\varepsilon, \quad E[X \varepsilon]=0, \quad \beta \in \mathbb{R}^k$$ will have a smaller MSE that the OLS estimator. The asymptotic distributions of the ridge estimator and the OLS estimator (that is, the distribut...
I have a data set with data from 26 multiple-choice exam papers. Each question has four alternatives, one of which is correct. I know, for each paper, how many answers had A as the correct option (and B, C and D). Is it possible to determine whether: There is tendency for one of the options to be correct, and if so, ...
After running MCC, will the result displayed be for the whole data or the testing data. I read MCC uses 2/3rd data for training and 1/3rd for testing but while checking my results i still see results for whole data and not only for the testing data. I need clarity on how i can get only testing result data. Thank you.
I would like to estimate a confidence interval for coefficients of my regression. I calculate the coefficients of the regression with the following code: library(sandwich) library(lmtest) myRegression <- lm(x ~ y) coeftest(myRegression, vcov = NeweyWest(myRegression, lag = NULL)) And the confidence interval with this ...
Let's say we have a dataset of 250 samples and we have engineered 30 attributes based on the domain knowledge. We perform a 10-fold CV and estimate the performance of our process of creating a model. Now as you know, it's likely that some of the 30 attributes are redundant and getting rid of some of them should both si...
I have two datasets consist of different features. I did multiple linear regression on these datasets separately and calculated MSE and r-squared scores. After that, I combine these features and the target values and doing multitask regression. I compare these two methods score and there is an improvement. My question...
I am trying to understand the below result set. F20 variable binned into two groups 0 and 1-722. The question I am posing here is for bin 0. I have responders variable as population1 and non-responders variable as population2. I also have %proportion for responders and non responders. INDEX is in % too and is the propo...
I recently asked a question seeking a mathematical interpretation/intuition behind the elementary equation relating sample mean and variance: $ E[X^2] = Var(X) +(E[X])^2$, geometric or otherwise. But now I'm curious about the superficially similar bias-variance tradeoff equation. $$ \begin{eqnarray} \text{MSE}(\hat{\th...
Assume a website redesign its page and want to assess whether the new design improves the click through rate (CTR) comparing to the old page. Say we have 1 million traffic and the company randomly split half of the traffic to the old page and the remaining half to the new page. I believe the conclusion draw from permut...
$y_t = b_0 + b_1 y_{t-1} + u_t$ $u_t = \sqrt{h_t} v_t$ $h_t = a_1 u^2_{t-1} + c_0 c_3 h_{t-1}$ where $v_t$ is a white noise process, $\mathbb{E}(v_t)=0$. How would we go about testing the hypothesis $H_0\colon \ c_0 c_3 = 0$? Would we use the log maximum likelihood? Can this be estimated consistently?
I am trying to understand difference in output between the following lines of code: library(survival) summary(coxph(Surv(futime, fustat) ~ age + strata(rx), data=ovarian)) summary(coxph(Surv(futime, fustat) ~ age, data=ovarian)) What does adding strata(rx) do? Explanation ?strata says: **Value** a new factor, whose...
In an endogenous switching model, if there is an additional endogenous explanatory variable, we can either follow a control function approach (Murtazashvili and Wooldridge 2016), or a full information maximum likelihood approach. I tried both, but the full information maximum likelihood approach does not work out. I su...
I'm working with a data set that has 29 subjects. Each subject was measured under four difference conditions. Let's call them A,B,C, and D. Within each condition a subject can belong to one of two mutually exclusive classifications, let's call them X and Y. I would like to know what differences exist between X and ...
Write a MATLAB function that computes the value of the Gaussian distribution N(m, S), at a given vector x. What does it mean by 'Gaussian distribution at vector x'? What does the question want actually?
In forecasting the performance of many agents in a time series, there is a strong seasonality component, in addition to non-seasonal features for each agent. How can I capture the overall seasonal trends in my model building process without overfitting? Currently, I'm using a time-series cross validation approach to fi...
I am trying to develop a scoring system for ad conversions. I have the type of data you would expect such as click-through rate (proportion) and the dollar amount of the sale. So I know I can develop an expected value scoring system from this type of data. But I want to find is there are other scoring system alternativ...
Let's say I first run a linear regression model Sales = f(TV Spend, Digital Spend). Now I add TV Spend and Digital Spend and run the second model. My second model is Sales = f(TV Spend+Digital Spend). How is the beta coefficient of the second model related to the beta coefficients of the first model? Also, does the f...
I keep hearing that neural net training is non-convex. The objective function is non-convex. My question is: What is the proof that the learning process is non-convex? How can you prove it is non-convex for say max likelihood training? Is training wrt all objective functions non convex? I am unable to find answers ...
I used the R package hdnom to plot a nomogram obtained from survival data, after applying the lasso method for model selection. I am trying to compare using the nomogram and the coefficients of the fitted Cox model, but I cannot figure out why the zeroes of the linear predictor and total point scale do not line up. Can...
In stochastic gradient descent, while decreasing the learning rate during training (e.g., after a set number of epochs) seems to be a common practice, but I haven't seen anyone alter the minibatch size in the same manner. Then I found a paper, On the importance of initialization and momentum in deep learning (Sutskever...
Let me preface the following by saying I have very little knowledge of the ins and outs of machine learning but I am familiar with statistics and programming. I am working on a project that considers multiple variables to help predict whether an ID is "high-risk", that is, a high chance they will terminate their contra...
I have n=1,000,000 data points with m=10 to m=60 attributes, i.e., m=10 to m=60 different variables. And I have a 1D output. I want to use support vector machine for classification. How would I do it so that it wouldn't take long for fitting the model. I am using Matlab. Thanks
I learned that it's common to do dimensionality reduction before clustering. But, is there any situation that it is better to do clustering first, and then do dimensionality reduction?
Do we need to transform data before implement PCA to the raw data? Or it just acceptable if we proceed to used PCA to the raw data?
I have six vectors, each of length say $n$ which is >= 100. The vector entries correspond to a measurement from a certain experiment on $n$ individuals. Each index in the vectors corresponds to one of these individuals. All these individuals were tested on six different days, giving me six vectors. First three sets of ...
A probably very easy computational question, but I don't really understand how it's done: I try to compute the point estimates of a normal distribution as $N \sim (\beta, \sigma)$. Using the method of moments, we get: $$\frac{1}{n} \sum_{i=1}^{n} X_{i} = \hat{\beta}$$ $$\frac{1}{n} \sum_{i=1}^{n} X_{i}^{2} = \hat{\sigm...
Yet another computing question: Why is $$\sum_{i=1}^{n} (X_{i} - \overline{X} + \overline{X} - \mu)^2 = \sum_{i=1}^{n} (X_{i} - \overline{X})^2 + n ( \overline{X} - \mu )^2 $$ In other words: Why is the cross-term $$2 \cdot \sum_{i=1}^{n} (X_{i} - \overline{X})(\overline{X} - \mu ) $$ equal to zero? Please assume the...
In a particular task I am given, I have to compute the Bayes estimator of $Bernoulli(\theta$) random variables $X_1, ..., X_n$. As a prior distribution $p(\theta)$, I have to assume a $Beta(\alpha, \beta)$ distribution. When I multiply the likelihood function with the prior distribution and simplify the term by droppin...