MATLAB Code:
clear all;
clc;
x(1)=2;
ii=1;
N=input('Number of terms Required');
for tt=1:1:N
x(ii+1)= 3 - x(ii);
ii=ii+1;
end
Result:
Number of terms Required 5
>> x
x =
2 1 2 1 2 1
given a size N, create a row vector x= [x1,x2,....,xN] which contains the first N terms...
Let X = x1, x2, . . . , xn be a sequence of n integers. A sub-sequence of X is a sequence obtained from X by deleting some elements. Give an O(n2) algorithm to find the longest monotonically increasing sub-sequences of X.
Please answer question (a)
X1 - X X2 – Å a. Let X1, ..., Xn i.i.d. random variables with X; ~ N(u, o). Express the vector in the | Xn – form AX and find its mean and variance covariance matrix. Show some typical elements of the vari- ance covariance matrix. b. Refer to question (a). The sample variance is given by S2 = n11 21–1(X; – X)2, which can be ex- pressed as S2 = n1X'(I – 111')X (why?)....
Consider The problem of determining whether an arbitrary sequence [x1,x2,...,xn] of n numbers contains repeated occurrences of some number. Show that this can be done in O(nlogn) time.
Let X1, X2, ...,Xn denote a random sample of size n from a Pareto distribution. X(1) = min(X1, X2, ..., Xn) has the cumulative distribution function given by: αη 1 - ( r> B X F(x) = . x <B 0 Show that X(1) is a consistent estimator of ß.
7.2.6. Let X1, X2....Xn be a random sample of size n from a beta d with parameters α-θ and β statistic for θ 5. Show tha the product Xi X2 . . . Xn is a sufficient oherat tious is a sufficient statistic for
1. Let X1, X2,... .Xn be a random sample of size n from a Bernoulli distribution for which p is the probability of success. We know the maximum likelihood estimator for p is p = 1 Σ_i Xi. ·Show that p is an unbiased estimator of p.
Let X1, X2, ..., Xn be a random sample of size n from a population that can be modeled by the following probability model: axa-1 fx(x) = 0 < x < 0, a > 0 θα a) Find the probability density function of X(n) max(X1,X2, ...,Xn). b) Is X(n) an unbiased estimator for e? If not, suggest a function of X(n) that is an unbiased estimator for e.
Let X1, X2, ..., Xn denote a random sample of size n from a population whose density fucntion is given by 383x-4 f S x f(x) = 0 elsewhere where ß > 0 is unknown. Consider the estimator ß = min(X1, X2, ...,Xn). Derive the bias of the estimator ß.
Let X1, X2, ... , Xn be a random sample of size n from the exponential distribution whose pdf is f(x; θ) = (1/θ)e^(−x/θ) , 0 < x < ∞, 0 <θ< ∞. Find the MVUE for θ. Let X1, X2, ... , Xn be a random sample of size n from the exponential distribution whose pdf is f(x; θ) = θe^(−θx) , 0 < x < ∞, 0 <θ< ∞. Find the MVUE for θ.
Central Limit Theorem: let x1,x2,...,xn be I.I.D. random variables with E(xi)= U Var(xi)= (sigma)^2 defind Z= x1+x2+...+xn the distribution of Z converges to a gaussian distribution P(Z<=z)=1-Q((z-Uz)/(sigma)^2) Use MATLAB to prove the central limit theorem. To achieve this, you will need to generate N random variables (I.I.D. with the distribution of your choice) and show that the distribution of the sum approaches a Guassian distribution. Plot the distribution and matlab code. Hint: you may find the hist() function helpful