statistics

how to measure he similarity between two 2D complex fields in matlab?

空扰寡人 提交于 2019-12-12 04:43:05
问题 I have a matrix operation Y=B*A*X; ; where A=exp(1i.*pi*rand(50,50)); B=transpose(A); X is the input which is random X=exp(1i.*pi*rand(50,50)); so I have Y calculated. Now I find another Y say Y1 for another X1=exp(1i.*pi*rand(50,50)); Y and Y1 are complex outputs. How can I measure the similarity between these fileds ? Can someone please help. I have tried rsme=sqrt(mean(abs(Y1(:))-abs(Y(:)).^2); But I guess it is a wrong measure ? 回答1: The mean-squared error (MSE) is a common similarity

chi-square - two sample test in r

本秂侑毒 提交于 2019-12-12 04:33:54
问题 There is in R a function to perform a chi-square two sample test ?http://www.itl.nist.gov/div898/software/dataplot/refman1/auxillar/chi2samp.htm For example I whant to prove if x = rnorm(100) and y = rnorm(100) come from the same distribution. I tried to use the chisq.test function, but I think it is not correct because it gives me a very large p-value > chisq.test(rnorm(100),runif(100)) Pearson's Chi-squared test data: rnorm(100) and runif(100) X-squared = 9900, df = 9801, p-value = 0.239

Calculating Quartiles in Analysis Services

自作多情 提交于 2019-12-12 03:59:22
问题 I´m using MDX code to calculate quartile, , like in this blog: https://electrovoid.wordpress.com/2011/06/24/ssas-quartile/ That is what I´m doing: WITH SET OrderedData AS ORDER ( NONEMPTY ( [Dim Parameter].[id].[id] *[Dim Result].[Id].[Id].ALLMEMBERS, [Measures].[Value] ), [Measures].[Value], BASC ) MEMBER [Measures].[RowCount] AS COUNT (OrderedData) MEMBER [Measures].[i25] AS ( .25 * ( [RowCount] - 1 ) ) + 1 MEMBER [Measures].[i25Lo] AS FIX([i25]) - 1 MEMBER [Measures].[i25Rem] AS ([i25] -

Daily minimum values in R

喜夏-厌秋 提交于 2019-12-12 03:45:26
问题 I am trying to extract the daily minimum zenith angle in a dataset which consists of 24h values (1 zenith angle value every hour) over ~31 days for 12 months. It looks like this: JulianDay Azimuth Zenith Date (YYMMDD HH:MM:SS) 2455928 174.14066 70.04650 2012-01-01 13:00:00 2455928 188.80626 70.30747 2012-01-01 14:00:00 2455928 203.03458 73.12297 2012-01-01 15:00:00 2455928 216.28061 78.20131 2012-01-01 16:00:00 2455928 228.35929 85.10759 2012-01-01 17:00:00 .... 2456293 146.33844 77.03456

What is the right algorithm to detect segmentations of a line chart? [closed]

烂漫一生 提交于 2019-12-12 03:37:35
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago . To be concrete, given 2D numerical data as is shown as line plots below. There are peaks on a background average movement (with small vibrations). We want to find the values of pairs (x1, x2) if those peaks drops down to average; or (x1) only if the line doesn't back to the

Calculating skewness of a data distribution in SQL in Access without an additional subquery

こ雲淡風輕ζ 提交于 2019-12-12 03:34:23
问题 I have a dataset in an Access database that, for simplicity's sake, looks like this: ID Group Employee Ticket ID ------ --------- -------- ----------------- 1 A Joe 123414 2 A Joe 12309124 3 A Bob 112321321 4 A Bob 213123214142 5 A Sam 123214214124 6 B Jen 412949218419 7 B Amy 12341234213 What I'm trying to do is calculate the statistical skewness of distribution of the number of tickets each employee has handled. In a perfect world, my SQL would be this: SELECT [Group], SKEW([myCount]) AS

lib for Nonlinear Fitting on iOS [closed]

↘锁芯ラ 提交于 2019-12-12 02:43:16
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I need to fit some data in an iOS app, basically with Newton's Law of Cooling: y = a + b * c^{x} I found the GNU Scientific Library is likely to handle this, however, it is out of consideration for the sake of GPL. Is there any open-sourced nonlinear Chi-Square solver in C/C++ with a commercial friendly license

degrees of freedom, t-statistic, and f-values of combined multiply imputed data

微笑、不失礼 提交于 2019-12-12 02:24:35
问题 I am a novice R user. I installed Zelig version 4.1-3 and Amelia II version 1.7. I am puzzled on how I can obtain the degrees of freedom, t-statistic, and f-values of combined multiply imputed data using R packages and functions. First, I loaded Amelia and Zelig: require(Amelia) require(Zelig) Then, I loaded the sample data that came with Amelia: data(freetrade) I created 5 imputations for this dataset using the amelia function. a.out <- amelia(freetrade, m = 5, ts = "year", cs = "country")

OLS of statsmodels does not work with inversely proportional data?

青春壹個敷衍的年華 提交于 2019-12-12 02:04:46
问题 I'm trying to perform a Ordinary Least Squares Regression with some inversely proportional data, but seems like the fitting result is wrong? import statsmodels.formula.api as sm import numpy as np import matplotlib.pyplot as plt y = np.arange(100, 0, -1) x = np.arange(0, 100) result = sm.OLS(y, x).fit() fig, ax = plt.subplots(nrows=1, ncols=1, figsize=(20, 4), sharey=True) ax.plot(x, result.fittedvalues, 'r-') ax.plot(x, y, 'x') fig.show() 回答1: You're not adding a constant as the

Proc Data sets argument error- Error 22-322 expecting a name

这一生的挚爱 提交于 2019-12-12 01:56:07
问题 I'm not sure how to use proc datasets statement. Here is the error and code attached as a picture. I just don't know what it wants when it says error 22-322 expecting a name. A simple example or solution would be great thanks. 回答1: There are several issues with your syntax: Proc datasets expects a library name, but you've given it a dataset name. Try using library = work; . In conjunction with the above, you need to add the line modify passengers; before the format statement so that proc