Results of TwoSampleTTest...

Asked by:

Hi,

I did some hypothesis testing exercises and I cross checked the result with Maple. I just used following vectors for an unpaired test

a := [88, 89, 92, 90, 90];
b := [92, 90, 91, 89, 91];

I ended up with the following solution:

HFloat(1.5225682336585966)
HFloat(-3.122568233658591)
for a 0.95 confidence interval.

Using

TwoSampleTTest(a, b, 0, confidence = .95, summarize = embed)

and

TwoSampleTTest(a, b, 0, confidence = .975, summarize = embed)

I get following results:

-2.75177 .. 1.15177

-3.13633 .. 1.53633

respectively. I can not explain the discrepancy.

Best regards,

Oliver

PS:

Maple Code in case files won´t be attached.

Unpaired t Test
restart;
Unpaired test-test dataset
a := [88, 89, 92, 90, 90];
b := [92, 90, 91, 89, 91];
The seÂ² estimate is given by:
seÂ²=var(a)+var(b)+2*cov(a*b)=var(a)+var(b)
seÂ²=
sigma[a]^2/Na+sigma[b]^2/Nb;
with Na, Nb being the length of vector a and b respectively.
2                              2
sigma[[88, 89, 92, 90, 90]]    sigma[[92, 90, 91, 89, 91]]
---------------------------- + ----------------------------
Na                             Nb
sigma[a]^2;
and
sigma[b]^2;
are approximated by
S[a]^2;
and
S[b]^2;
2
sigma[[88, 89, 92, 90, 90]]
2
sigma[[92, 90, 91, 89, 91]]
2
S[[88, 89, 92, 90, 90]]
2
S[[92, 90, 91, 89, 91]]
with
S[X]^2;
defined as
S[X]*`Â²` = (sum(X[i]-(sum(X[j], j = 1 .. N))/N, i = 1 .. N))^2/N;
2
S[X]
2
/      /         N       \\
|      |       -----     ||
|  N   |        \        ||
|----- |         )       ||
| \    |        /    X[j]||
|  )   |       -----     ||
| /    |       j = 1     ||
|----- |X[i] - ----------||
\i = 1 \           N     //
S[X] ï¿ï¾² = ----------------------------
N
with(Statistics);
Sa := Variance(a);
HFloat(2.1999999999999993)
Sb := Variance(b);
HFloat(1.3000000000000003)
Now we are ready to do hypothesis testing (0.95).
We have (with k=min(Na,Nb)=5):
C = mean(a)-mean(b); Deviation := t_(alpha/a, k-1)*se(Sa/k-Sb/k);
c := Mean(a)-Mean(b); deviation := 2.776*sqrt((1/5)*Variance(a)+(1/5)*Variance(b));
HFloat(-0.7999999999999972)
HFloat(2.3225682336585938)
upperlimit := c+deviation; lowerlimit := c-deviation;
HFloat(1.5225682336585966)
HFloat(-3.122568233658591)

Execution of built in student test
TwoSampleTTest(a, b, 0, confidence = .95, summarize = embed);

Testing the speed of a procedure...

Asked by:

hi, is there any maple command that will allow me to test the speed of a procedure? something like the ctime in c++ or time in java.thanks

proving or negating an inequality...

Asked by:

Hello. I have an inequality and I need to prove or negate if it is true or false. This inequality has 8 variables. I simplify it and try to see if it is ture or false. I tried "test relation" in maple and it seems I can't say it is always true or false. For some values of the variables it is true and for some others its false. Is there a method I can show if this inequlity is hold under some assumptions? I mean I want to keep some variables as constant and prove it up to a point. My inequlity is below. Thank you for the help in advance.

(P[A]*(p-w)/(1-P[A])-c)*H[A]+(w-P[A]*(p-w)/(1-P[A]))*P[A]*H[A]+w[u]*P[B]*(1-P[A])*H[B] < (P[B]*(p-w)/(1-P[B])-c)*H[B]+(w-P[B]*(p-w)/(1-P[B]))*P[B]*H[B]+w[u]*P[A]*(1-P[B])*H[B]

And this is how it looks on maple:

How to use testeq to verify solutions of an equati...

Asked by:

I've got a pair of equations :

x^3-4x=y and y^3-4y=x

which I've defined as eqns:={,}

and 9 solutions as solns1:={,,..}

and being stored as s1,s2,..s9

when I run a command such as testeq(subs(s1,eqns[1])=subs(s1,eqns[2])

I get an error of passing invalid arguments into testeq. What I essentially need to show is that on substituting for x,y from each s1,..s9; both equations get the same result. What am I doing incorrectly?

I've also noticed that just subs(s1,eqns[1]) returns an equality; I don't quite understand why

Warning, solutions may have been lost...

Asked by:

Hi

I need your help .. I solve a system and I get the error Warning, solutions may have been lost.

The maple code is attached.

testerror.mw

Thank you for your help.

Proper way to use CodeTools:-Test...

Asked by:

Cause CodeTools:-Test will not eval the paramater:

```
f := x -> x+1;

y := 2;

CodeTools:-Test( f(1), 2); # this will work as normal

CodeTools:-Test( f(1), y); # this will not work because `y` will not eval as 2

```

So current my solution is

```
test := subs(y=2, () -> CodeTools:-Test( f(1), y));

test();

```

I don't know is there any more proper solution for this.

More general, is there a way to force evaluate an `uneval` parameter?

t-test for the Difference Between Two Dependent Me...

Asked by:

Hi,

I want to conduct the t- test with a

- null hypothesis of : M1-M2 >= 0

- alternative hypothesis of M1-M2 < 0

I found that I can choose the upper or lower tail option for the alternative hypothesis but I am not sure if the same as I want

any idea ?

Fix a syntax error in my simple function (please h...

Asked by:

firstly apologies in advance for stuff in this question such as "triangle symbol",  my computer is pretty old.

ok so i was confused a bit here, what i'm trying to do is write a maple procedure that computes Af for a given f contained in V . except we only need to correct the bug in the script below. This script demonstrates such a procedure in the case that omega is a square. The domain is given here as the negative set of a function F contained in V .  I have left in notes where/what i think we need to do but i dunno how to...

N:=10 ; # Global Var
F:=(x,y)->sgn(abs(x-N/2)+abs(y-N/2)-N/4);
Average := proc(F, f0) local f, i, j;
f := f0; # !!!!!!!!!!!!!! something is bad here...
for i to N do for j to N do
if F(i, j) < 0 then
f[i, j] := (f0[i - 1, j] + f0[i + 1, j] + f0[i, j + 1] + f0[i, j - 1])/4 ;
end if;
end do;end do;
return f;
end proc;
f0:=Matrix(N,F); # just to have something to test the procedure
Average(F,f0); # does not return the expected average, modifies f0

the necessary information we were given to produce this so far was..

Let N be a positive integer and [N] = {i contained in N | 1<= i <=N }  Let "Omega" C {(i,j) contained in [N] x [N] | 2<=i,j<=N-1} be a subset. Let V = R^([N]x[N]) be the vector space of real valued functions [N]x[N] -> R
and A, "triangle symbol":V->V (average) and "triangle symbole" (Laplacian) be the linear maps such that
[Af](i; j) = f(i; j)      if (i; j) not contained in "Omega"   OR

[f(i, j + 1) + f(i, j - 1) + f(i + 1, j) + f(i - 1, j)]/4 if (i,j) is contained in "Omega"

["traingle symbol"f](i,j) =  0 if (i,j) isnt contained in "Omega"   OR

( f(i,j) - [f(i, j + 1) + f(i, j - 1) + f(i + 1, j) + f(i - 1, j)]/4 )    if (i,j) is contained in "Omega"

Please and thank you for any help in advance <3

Asked by:

Maple IDE Testers Wanted

Maple

Maple IDE team is launching a Tester Program that will allow us to incorporate more input in the product design and development process.

We are looking for regular testers for Maple IDE. Your testing complements our in-team testing of new software versions. By enlisting a diverse group of beta testers, we can see how the software performs when it's being used for normal, ordinary tasks. This lets us provide a more стабле Maple IDE with better user experience. As a member...

has testeq a bug?...

Asked by:

testeq() gives inconsistent results. See this example:

Equation (1):

computes to

Equation

Testing for a complex number...

Asked by:

I need to test a list of numbers to find if any of them are complex. if a complex is found then remove that complete row from the list. the potential complex numbers in my list are a, b and c. b is complex i.e has a non zero imaginery part in row 1 so only row 1 should get deleted. the a b and c were originally generated from the arcsin function. Would appreciate help on this. I know it should be simple enough to do. Thanks in advance.

Error, (in testeq) too many levels of recursion, h...

Asked by:

Can't find what the matter in recursive occurance of this problem. Anyone knows how to sort it out, thanks

`k:=20:m:=4:`
`p[0] := 1:`
`tr := 4:`
`omega[n]:=sqrt(k/m):`
`T[n]:=(2 pi/omega[n]):> maxpoint := proc (x) local tr, p1;tr := evalf(x*T[n]):p1 := piecewise(t1 <= tr, p[0]*t1/tr, p[0]):maximize(int(p1*sin(omega[n]*(t-t1))/(m*omega[n]), t1 = 0 .. t), t = 0 .. dur) :`

The Spearman test

Maple

This is one of rank tests.
Non-parametric methods are widely used for studying populations that take on a ranked order (such as movie reviews receiving one to four stars).
The use of non-parametric methods may be necessary when data have a ranking but no clear numerical interpretation, such as when assessing preferences.
In terms of levels of measurement, non-parametric methods result in "ordinal" data.
After the introduction to the topic let's turn to an example.

What's wrong with fsolve? Crash test....

Asked by:

fsolve_test.mw fsolve test

 1 2 Page 1 of 2
﻿