Answered

How can I introduce a known autocovariance to a lognormal process

You should be able to do it by generating your sequence one element at a time, if you can't find a canned routine that will do i...

How can I introduce a known autocovariance to a lognormal process

You should be able to do it by generating your sequence one element at a time, if you can't find a canned routine that will do i...

1 day ago | 0

Answered

How to calculate the conditional proabability?

Crude, but maybe illustrative: all=readtable('RainTampa.txt','headerlines',31) nonzeroVar2 = all(all.Var2~=0,:); nonzeroVar2a...

How to calculate the conditional proabability?

Crude, but maybe illustrative: all=readtable('RainTampa.txt','headerlines',31) nonzeroVar2 = all(all.Var2~=0,:); nonzeroVar2a...

7 days ago | 0

Answered

How to find the maximum of a normalized fit of a histogram

Try this: dist = Histogram(2) maxnorm = max(dist.YData); line([min(dist.XData) max(dist.XData)], [maxnorm maxnorm], 'LineWidt...

How to find the maximum of a normalized fit of a histogram

Try this: dist = Histogram(2) maxnorm = max(dist.YData); line([min(dist.XData) max(dist.XData)], [maxnorm maxnorm], 'LineWidt...

8 days ago | 0

Answered

Extreme Value Distribution y-axis not same with Histogram

histogram(total,'normalization','pdf');

Extreme Value Distribution y-axis not same with Histogram

histogram(total,'normalization','pdf');

8 days ago | 0

Answered

Multiple univariate or multivariate analysis?

No, that's probably not the right way to go. The problem with this approach is that you have a 5% chance of making a type 1 err...

Multiple univariate or multivariate analysis?

No, that's probably not the right way to go. The problem with this approach is that you have a 5% chance of making a type 1 err...

10 days ago | 0

Answered

How to calculate the P-value using chi-square and degrees of freedom

p = 1 - chi2cdf(x,df)

How to calculate the P-value using chi-square and degrees of freedom

p = 1 - chi2cdf(x,df)

13 days ago | 0

Answered

Is there a way to do a multi normal distribution fitting in Matlab?

The sigma isn't really off. GMModel.Sigma is variance = sigma^2

Is there a way to do a multi normal distribution fitting in Matlab?

The sigma isn't really off. GMModel.Sigma is variance = sigma^2

14 days ago | 0

| accepted

Answered

Is there a way to do a multi normal distribution fitting in Matlab?

See fitgmdist

Is there a way to do a multi normal distribution fitting in Matlab?

See fitgmdist

14 days ago | 1

Answered

Log-Normal fit of histogram

fitdist wants the x values that were tabulated to get the histogram, not the bin counts. From your histogram, it looks like you...

Log-Normal fit of histogram

fitdist wants the x values that were tabulated to get the histogram, not the bin counts. From your histogram, it looks like you...

16 days ago | 0

Answered

Parameter estimation - estimate integers only

One way to do this is to write your objective function to return an error function that is linearly interpolated between two int...

Parameter estimation - estimate integers only

One way to do this is to write your objective function to return an error function that is linearly interpolated between two int...

17 days ago | 0

Answered

Fmincon: how to change input variable of function which is not a design variable?

If I follow what you are trying to do, one way is by nesting your objective function within some outer master function, somethin...

Fmincon: how to change input variable of function which is not a design variable?

If I follow what you are trying to do, one way is by nesting your objective function within some outer master function, somethin...

19 days ago | 0

| accepted

Answered

How to define the Conditional probability density function from a n-by-2 matrix ?

Maybe start with 'ksdensity' to estimate the joint pdf of x & y from your observed x,y pairs. Once you have a good numerical es...

How to define the Conditional probability density function from a n-by-2 matrix ?

Maybe start with 'ksdensity' to estimate the joint pdf of x & y from your observed x,y pairs. Once you have a good numerical es...

22 days ago | 0

| accepted

Answered

Plotting average of many empirical cumulative distribution functions

I'm pretty sure there is no function to do that. To compute the average function by Vincentizing, you first choose a set of CDF ...

Plotting average of many empirical cumulative distribution functions

I'm pretty sure there is no function to do that. To compute the average function by Vincentizing, you first choose a set of CDF ...

25 days ago | 0

| accepted

Answered

Problems with fmincon for design optimization

Hi Soheil, You have posted a lot of information and I certainly have not digested even a large fraction of it (it would take me...

Problems with fmincon for design optimization

Hi Soheil, You have posted a lot of information and I certainly have not digested even a large fraction of it (it would take me...

27 days ago | 0

| accepted

Answered

CDF-vector- 2 random variables

You apparently have a probability for each of the x and y values. So, you can just compute the different possible Ln(Z) values f...

CDF-vector- 2 random variables

You apparently have a probability for each of the x and y values. So, you can just compute the different possible Ln(Z) values f...

28 days ago | 0

| accepted

Answered

How create joint distribution of two dependent variables?

I don't think your two questions are equivalent. If you have the two marginal pdfs and the correlation, there are lots of ways ...

How create joint distribution of two dependent variables?

I don't think your two questions are equivalent. If you have the two marginal pdfs and the correlation, there are lots of ways ...

28 days ago | 0

| accepted

Answered

Generate a random sequence with assigned probabiity

Homework? OK, here's a hint: Imagine that you have an array with 8 positions and that you choose array positions randomly (each...

Generate a random sequence with assigned probabiity

Homework? OK, here's a hint: Imagine that you have an array with 8 positions and that you choose array positions randomly (each...

28 days ago | 0

Answered

Multivariate Nomral Distribution Matlab

If you have only those 9 discrete combinations, then you can make their probabilities be any values you want (summing to one). ...

Multivariate Nomral Distribution Matlab

If you have only those 9 discrete combinations, then you can make their probabilities be any values you want (summing to one). ...

29 days ago | 0

| accepted

Answered

Multivariate Nomral Distribution Matlab

I don't see anything wrong with what you are doing, but only with your expectations about things summing to 1. In general, the ...

Multivariate Nomral Distribution Matlab

I don't see anything wrong with what you are doing, but only with your expectations about things summing to 1. In general, the ...

29 days ago | 0

Answered

Choose samples from statistical distribution for fmincon optimization

It is probably a better idea to select the samples randomly and then have fmincon optimize for the given sample. If you must ta...

Choose samples from statistical distribution for fmincon optimization

It is probably a better idea to select the samples randomly and then have fmincon optimize for the given sample. If you must ta...

29 days ago | 0

| accepted

Answered

How to synchronise inherited properties of class

I would say your UTubeClass should not descend from TubeClass. It's not the case that UTube "is a" Tube, but rather than UTube ...

How to synchronise inherited properties of class

I would say your UTubeClass should not descend from TubeClass. It's not the case that UTube "is a" Tube, but rather than UTube ...

1 month ago | 0

| accepted

Answered

Bootstrap Confidence interval Error: "Statistic size 999 for one jackknife sample is not equal to statistic size for the entire data 1000"

The problem is that the output of function m is a vector of 1000 elements for the full sample and it is a vector of 999 elements...

Bootstrap Confidence interval Error: "Statistic size 999 for one jackknife sample is not equal to statistic size for the entire data 1000"

The problem is that the output of function m is a vector of 1000 elements for the full sample and it is a vector of 999 elements...

1 month ago | 0

Answered

Monte Carlo Simulation to generate 10,000 data from 100 data.

Here is one way: originalSample = rand(100,1); % You have your own original sample. This is some fake data to use instead for ...

Monte Carlo Simulation to generate 10,000 data from 100 data.

Here is one way: originalSample = rand(100,1); % You have your own original sample. This is some fake data to use instead for ...

1 month ago | 0

Answered

Monte Carlo Simulation Result Tabulation

% rand(2,5) doesn't do what you seem to think. Try this % (with a little extra code that might help you see how to do this in ...

Monte Carlo Simulation Result Tabulation

% rand(2,5) doesn't do what you seem to think. Try this % (with a little extra code that might help you see how to do this in ...

1 month ago | 1

| accepted

Answered

Histogram Fitting in Matlab

First, I suggest you change the histogram plot so that the frequencies are represented by the areas of the different bars rather...

Histogram Fitting in Matlab

First, I suggest you change the histogram plot so that the frequencies are represented by the areas of the different bars rather...

1 month ago | 1

| accepted

Answered

zeros in data for gamma distribution

rain1positive = rain1(rain1>0);

zeros in data for gamma distribution

rain1positive = rain1(rain1>0);

1 month ago | 0

| accepted

Answered

How to add a time limit to response time?

One way is to use GetSecs, which returns the current time. For example, MaxWait = 1.5; % As an example, suppose you want a ma...

How to add a time limit to response time?

One way is to use GetSecs, which returns the current time. For example, MaxWait = 1.5; % As an example, suppose you want a ma...

1 month ago | 0

| accepted

Answered

Parameters for Frechet Distribution

You could write a function to compute -log(likelihood of your data) from alpha & beta, then use fminsearch to find the alpha,bet...

Parameters for Frechet Distribution

You could write a function to compute -log(likelihood of your data) from alpha & beta, then use fminsearch to find the alpha,bet...

2 months ago | 0

Answered

Convolution of two probability density function

I don't know whether you can do this directly in MATLAB. If not, you can do it using the Cupid toolbox. Here is an example: %...

Convolution of two probability density function

I don't know whether you can do this directly in MATLAB. If not, you can do it using the Cupid toolbox. Here is an example: %...

2 months ago | 0

Answered

How can i merge 2 cells with different items

function str3 = mergefields(str1,str2) % Note: Returns the value in str2 for any field that is common % to both str1 & str2. ...

How can i merge 2 cells with different items

function str3 = mergefields(str1,str2) % Note: Returns the value in str2 for any field that is common % to both str1 & str2. ...

2 months ago | 0

| accepted