Unanswered Questions

This page lists MaplePrimes questions that have not yet received an answer

Hello!

I want to calculate Eigenvalues. Depending on values for digits and which datatype I choose Maple sometimes returns zero as Eigenvalues. Maybe there is a problem with the used routines: CLAPACK sw_dgeevx_, CLAPACK sw_zgeevx_.

Thank you for your suggestions!
 

``

 

Problems LinearAlgebra:-Eigenvalues, Digits, ':-datatype' = ':-sfloat', ':-datatype' = ':-complex'( ':-sfloat' )

 

restart;

interface( ':-displayprecision' = 5 ):
 

infolevel['LinearAlgebra'] := 5;
myPlatform := kernelopts( ':-platform' );
myVersion := kernelopts( ':-version' );

5

 

"windows"

 

`Maple 2018.2, X86 64 WINDOWS, Nov 16 2018, Build ID 1362973`

(1.1)

Example 1

 

A1 := Matrix( 5, 5, [[0, 1, 0, 0, 0], [0, 0, 1, 0, 0], [0, 0, 0, 1, 0], [0, 0, 0, 0, 1], [-10201/1000, 30199/10000, -5049/250, 97/50, -48/5]] );

Matrix(5, 5, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 1, (2, 4) = 0, (2, 5) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0, (3, 4) = 1, (3, 5) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 0, (4, 5) = 1, (5, 1) = -10201/1000, (5, 2) = 30199/10000, (5, 3) = -5049/250, (5, 4) = 97/50, (5, 5) = -48/5})

(1.1.1)

LinearAlgebra:-Eigenvalues( A1 );

CharacteristicPolynomial: working on determinant of minor 2
CharacteristicPolynomial: working on determinant of minor 3
CharacteristicPolynomial: working on determinant of minor 4
CharacteristicPolynomial: working on determinant of minor 5

 

Vector(5, {(1) = -10, (2) = 1/10+I, (3) = 1/10-I, (4) = 1/10+I, (5) = 1/10-I})

(1.1.2)

A11 := Matrix( op( 1, A1 ),( i,j ) -> evalf( A1[i,j] ), ':-datatype' = ':-sfloat' );

Matrix(5, 5, {(1, 1) = 0., (1, 2) = 1.00000, (1, 3) = 0., (1, 4) = 0., (1, 5) = 0., (2, 1) = 0., (2, 2) = 0., (2, 3) = 1.00000, (2, 4) = 0., (2, 5) = 0., (3, 1) = 0., (3, 2) = 0., (3, 3) = 0., (3, 4) = 1.00000, (3, 5) = 0., (4, 1) = 0., (4, 2) = 0., (4, 3) = 0., (4, 4) = 0., (4, 5) = 1.00000, (5, 1) = -10.20100, (5, 2) = 3.01990, (5, 3) = -20.19600, (5, 4) = 1.94000, (5, 5) = -9.60000})

(1.1.3)

Digits := 89;
LinearAlgebra:-Eigenvalues( A11 );

Digits := 89

 

Eigenvalues: calling external function
Eigenvalues: initializing the output object
Eigenvalues: using software external library
Eigenvalues: CLAPACK sw_dgeevx_

 

Vector[column](%id = 18446745881249354686)

(1.1.4)

Digits := 90;
LinearAlgebra:-Eigenvalues( A11 );

Digits := 90

 

Eigenvalues: calling external function
Eigenvalues: initializing the output object
Eigenvalues: using software external library
Eigenvalues: CLAPACK sw_dgeevx_

 

Vector[column](%id = 18446745881249352150)

(1.1.5)

A12 := Matrix( op( 1, A1 ),( i,j ) -> evalf( A1[i,j] ), ':-datatype' = ':-complex'( ':-sfloat' ) );

Matrix(5, 5, {(1, 1) = 0.+0.*I, (1, 2) = 1.00000+0.*I, (1, 3) = 0.+0.*I, (1, 4) = 0.+0.*I, (1, 5) = 0.+0.*I, (2, 1) = 0.+0.*I, (2, 2) = 0.+0.*I, (2, 3) = 1.00000+0.*I, (2, 4) = 0.+0.*I, (2, 5) = 0.+0.*I, (3, 1) = 0.+0.*I, (3, 2) = 0.+0.*I, (3, 3) = 0.+0.*I, (3, 4) = 1.00000+0.*I, (3, 5) = 0.+0.*I, (4, 1) = 0.+0.*I, (4, 2) = 0.+0.*I, (4, 3) = 0.+0.*I, (4, 4) = 0.+0.*I, (4, 5) = 1.00000+0.*I, (5, 1) = -10.20100+0.*I, (5, 2) = 3.01990+0.*I, (5, 3) = -20.19600+0.*I, (5, 4) = 1.94000+0.*I, (5, 5) = -9.60000+0.*I})

(1.1.6)

Digits := 100;
LinearAlgebra:-Eigenvalues( A12 );

Digits := 100

 

Eigenvalues: calling external function
Eigenvalues: initializing the output object
Eigenvalues: using software external library
Eigenvalues: CLAPACK sw_zgeevx_

 

Vector[column](%id = 18446745881249345038)

(1.1.7)

Digits := 250;
LinearAlgebra:-Eigenvalues( A12 );

Digits := 250

 

Eigenvalues: calling external function
Eigenvalues: initializing the output object
Eigenvalues: using software external library
Eigenvalues: CLAPACK sw_zgeevx_

 

Vector[column](%id = 18446745881342643606)

(1.1.8)

 

 

Example 2

 

A2 := Matrix(3, 3, [[0, 1, 0], [0, 0, 1], [3375, -675, 45]]);

Matrix(3, 3, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 1, (3, 1) = 3375, (3, 2) = -675, (3, 3) = 45})

(1.2.1)

LinearAlgebra:-Eigenvalues( A2 );

IntegerCharacteristicPolynomial: Computing characteristic polynomial for a 3 x 3 matrix

IntegerCharacteristicPolynomial: Using prime 33554393
IntegerCharacteristicPolynomial: Using prime 33554383
IntegerCharacteristicPolynomial: Used total of  2  prime(s)

 

Vector(3, {(1) = 15, (2) = 15, (3) = 15})

(1.2.2)

A21 := Matrix( op( 1, A2 ),( i,j ) -> evalf( A2[i,j] ), ':-datatype' = ':-sfloat' );

Matrix(3, 3, {(1, 1) = 0., (1, 2) = 1.00000, (1, 3) = 0., (2, 1) = 0., (2, 2) = 0., (2, 3) = 1.00000, (3, 1) = 3375.00000, (3, 2) = -675.00000, (3, 3) = 45.00000})

(1.2.3)

Digits := 77;
LinearAlgebra:-Eigenvalues( A21 );

Digits := 77

 

Eigenvalues: calling external function
Eigenvalues: initializing the output object
Eigenvalues: using software external library
Eigenvalues: CLAPACK sw_dgeevx_

 

Vector[column](%id = 18446745881342621686)

(1.2.4)

Digits := 78;
LinearAlgebra:-Eigenvalues( A21 );

Digits := 78

 

Eigenvalues: calling external function
Eigenvalues: initializing the output object
Eigenvalues: using software external library
Eigenvalues: CLAPACK sw_dgeevx_

 

Vector[column](%id = 18446745881342617230)

(1.2.5)

A22 := Matrix( op( 1, A2 ),( i,j ) -> evalf( A2[i,j] ), ':-datatype' = ':-complex'( ':-sfloat' ) );

Matrix(3, 3, {(1, 1) = 0.+0.*I, (1, 2) = 1.00000+0.*I, (1, 3) = 0.+0.*I, (2, 1) = 0.+0.*I, (2, 2) = 0.+0.*I, (2, 3) = 1.00000+0.*I, (3, 1) = 3375.00000+0.*I, (3, 2) = -675.00000+0.*I, (3, 3) = 45.00000+0.*I})

(1.2.6)

Digits := 58;
LinearAlgebra:-Eigenvalues( A22 );

Digits := 58

 

Eigenvalues: calling external function
Eigenvalues: initializing the output object
Eigenvalues: using software external library
Eigenvalues: CLAPACK sw_zgeevx_

 

Vector[column](%id = 18446745881342614934)

(1.2.7)

Digits := 59;
LinearAlgebra:-Eigenvalues( A22 );

Digits := 59

 

Eigenvalues: calling external function
Eigenvalues: initializing the output object
Eigenvalues: using software external library
Eigenvalues: CLAPACK sw_zgeevx_

 

Vector[column](%id = 18446745881325525942)

(1.2.8)

 

 

Example 3

 

A3 := Matrix(4, 4, [[0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1], [-48841, 8840, -842, 40]]);

Matrix(4, 4, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 0, (1, 4) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 1, (2, 4) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0, (3, 4) = 1, (4, 1) = -48841, (4, 2) = 8840, (4, 3) = -842, (4, 4) = 40})

(1.3.1)

LinearAlgebra:-Eigenvalues( A3 );

IntegerCharacteristicPolynomial: Computing characteristic polynomial for a 4 x 4 matrix
IntegerCharacteristicPolynomial: Using prime 33554393

IntegerCharacteristicPolynomial: Using prime 33554383
IntegerCharacteristicPolynomial: Used total of  2  prime(s)

 

Vector(4, {(1) = 10+11*I, (2) = 10-11*I, (3) = 10+11*I, (4) = 10-11*I})

(1.3.2)

A31 := Matrix( op( 1, A3 ),( i,j ) -> evalf( A3[i,j] ), ':-datatype' = ':-sfloat' );

Matrix(4, 4, {(1, 1) = 0., (1, 2) = 1.00000, (1, 3) = 0., (1, 4) = 0., (2, 1) = 0., (2, 2) = 0., (2, 3) = 1.00000, (2, 4) = 0., (3, 1) = 0., (3, 2) = 0., (3, 3) = 0., (3, 4) = 1.00000, (4, 1) = -48841.00000, (4, 2) = 8840.00000, (4, 3) = -842.00000, (4, 4) = 40.00000})

(1.3.3)

Digits := 75;
LinearAlgebra:-Eigenvalues( A31 );

Digits := 75

 

Eigenvalues: calling external function
Eigenvalues: initializing the output object
Eigenvalues: using software external library
Eigenvalues: CLAPACK sw_dgeevx_

 

Vector[column](%id = 18446745881324662046)

(1.3.4)

Digits := 76;
LinearAlgebra:-Eigenvalues( A31 );

Digits := 76

 

Eigenvalues: calling external function
Eigenvalues: initializing the output object
Eigenvalues: using software external library
Eigenvalues: CLAPACK sw_dgeevx_

 

Vector[column](%id = 18446745881324657710)

(1.3.5)

A32 := Matrix( op( 1, A3 ),( i,j ) -> evalf( A3[i,j] ), ':-datatype' = ':-complex'( ':-sfloat' ) );

Matrix(4, 4, {(1, 1) = 0.+0.*I, (1, 2) = 1.00000+0.*I, (1, 3) = 0.+0.*I, (1, 4) = 0.+0.*I, (2, 1) = 0.+0.*I, (2, 2) = 0.+0.*I, (2, 3) = 1.00000+0.*I, (2, 4) = 0.+0.*I, (3, 1) = 0.+0.*I, (3, 2) = 0.+0.*I, (3, 3) = 0.+0.*I, (3, 4) = 1.00000+0.*I, (4, 1) = -48841.00000+0.*I, (4, 2) = 8840.00000+0.*I, (4, 3) = -842.00000+0.*I, (4, 4) = 40.00000+0.*I})

(1.3.6)

Digits := 100;
LinearAlgebra:-Eigenvalues( A32 );

Digits := 100

 

Eigenvalues: calling external function
Eigenvalues: initializing the output object
Eigenvalues: using software external library
Eigenvalues: CLAPACK sw_zgeevx_

 

Vector[column](%id = 18446745881324648198)

(1.3.7)

Digits := 250;
LinearAlgebra:-Eigenvalues( A32 );

Digits := 250

 

Eigenvalues: calling external function
Eigenvalues: initializing the output object
Eigenvalues: using software external library
Eigenvalues: CLAPACK sw_zgeevx_

 

Vector[column](%id = 18446745881327288182)

(1.3.8)

 

 

Example 4

 

A4 := Matrix(8, 8, [[0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0, 0, 1], [-1050625/20736, 529925/1296, -15417673/10368, 3622249/1296, -55468465/20736, 93265/108, -1345/8, 52/3]]);

Matrix(8, 8, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (1, 6) = 0, (1, 7) = 0, (1, 8) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 1, (2, 4) = 0, (2, 5) = 0, (2, 6) = 0, (2, 7) = 0, (2, 8) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0, (3, 4) = 1, (3, 5) = 0, (3, 6) = 0, (3, 7) = 0, (3, 8) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 0, (4, 5) = 1, (4, 6) = 0, (4, 7) = 0, (4, 8) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = 0, (5, 5) = 0, (5, 6) = 1, (5, 7) = 0, (5, 8) = 0, (6, 1) = 0, (6, 2) = 0, (6, 3) = 0, (6, 4) = 0, (6, 5) = 0, (6, 6) = 0, (6, 7) = 1, (6, 8) = 0, (7, 1) = 0, (7, 2) = 0, (7, 3) = 0, (7, 4) = 0, (7, 5) = 0, (7, 6) = 0, (7, 7) = 0, (7, 8) = 1, (8, 1) = -1050625/20736, (8, 2) = 529925/1296, (8, 3) = -15417673/10368, (8, 4) = 3622249/1296, (8, 5) = -55468465/20736, (8, 6) = 93265/108, (8, 7) = -1345/8, (8, 8) = 52/3})

(1.4.1)

LinearAlgebra:-Eigenvalues( A4 );

CharacteristicPolynomial: working on determinant of minor 2
CharacteristicPolynomial: working on determinant of minor 3

CharacteristicPolynomial: working on determinant of minor 4
CharacteristicPolynomial: working on determinant of minor 5
CharacteristicPolynomial: working on determinant of minor 6
CharacteristicPolynomial: working on determinant of minor 7
CharacteristicPolynomial: working on determinant of minor 8

 

Vector(8, {(1) = 1/3-(1/4)*I, (2) = 1/3+(1/4)*I, (3) = 4-5*I, (4) = 4+5*I, (5) = 1/3-(1/4)*I, (6) = 1/3+(1/4)*I, (7) = 4-5*I, (8) = 4+5*I})

(1.4.2)

A41 := Matrix( op( 1, A4 ),( i,j ) -> evalf( A4[i,j] ), ':-datatype' = ':-sfloat' );

Matrix(8, 8, {(1, 1) = 0., (1, 2) = 1.00000, (1, 3) = 0., (1, 4) = 0., (1, 5) = 0., (1, 6) = 0., (1, 7) = 0., (1, 8) = 0., (2, 1) = 0., (2, 2) = 0., (2, 3) = 1.00000, (2, 4) = 0., (2, 5) = 0., (2, 6) = 0., (2, 7) = 0., (2, 8) = 0., (3, 1) = 0., (3, 2) = 0., (3, 3) = 0., (3, 4) = 1.00000, (3, 5) = 0., (3, 6) = 0., (3, 7) = 0., (3, 8) = 0., (4, 1) = 0., (4, 2) = 0., (4, 3) = 0., (4, 4) = 0., (4, 5) = 1.00000, (4, 6) = 0., (4, 7) = 0., (4, 8) = 0., (5, 1) = 0., (5, 2) = 0., (5, 3) = 0., (5, 4) = 0., (5, 5) = 0., (5, 6) = 1.00000, (5, 7) = 0., (5, 8) = 0., (6, 1) = 0., (6, 2) = 0., (6, 3) = 0., (6, 4) = 0., (6, 5) = 0., (6, 6) = 0., (6, 7) = 1.00000, (6, 8) = 0., (7, 1) = 0., (7, 2) = 0., (7, 3) = 0., (7, 4) = 0., (7, 5) = 0., (7, 6) = 0., (7, 7) = 0., (7, 8) = 1.00000, (8, 1) = -50.66671, (8, 2) = 408.89275, (8, 3) = -1487.04408, (8, 4) = 2794.94522, (8, 5) = -2674.98384, (8, 6) = 863.56481, (8, 7) = -168.12500, (8, 8) = 17.33333})

(1.4.3)

Digits := 74;
LinearAlgebra:-Eigenvalues( A41 );

Digits := 74

 

Eigenvalues: calling external function
Eigenvalues: initializing the output object
Eigenvalues: using software external library
Eigenvalues: CLAPACK sw_dgeevx_

 

Vector[column](%id = 18446745881317242630)

(1.4.4)

Digits := 75;
LinearAlgebra:-Eigenvalues( A41 );

Digits := 75

 

Eigenvalues: calling external function
Eigenvalues: initializing the output object
Eigenvalues: using software external library
Eigenvalues: CLAPACK sw_dgeevx_

 

Vector[column](%id = 18446745881317239134)

(1.4.5)

A42 := Matrix( op( 1, A4 ),( i,j ) -> evalf( A4[i,j] ), ':-datatype' = ':-complex'( ':-sfloat' ) );

Matrix(8, 8, {(1, 1) = 0.+0.*I, (1, 2) = 1.00000+0.*I, (1, 3) = 0.+0.*I, (1, 4) = 0.+0.*I, (1, 5) = 0.+0.*I, (1, 6) = 0.+0.*I, (1, 7) = 0.+0.*I, (1, 8) = 0.+0.*I, (2, 1) = 0.+0.*I, (2, 2) = 0.+0.*I, (2, 3) = 1.00000+0.*I, (2, 4) = 0.+0.*I, (2, 5) = 0.+0.*I, (2, 6) = 0.+0.*I, (2, 7) = 0.+0.*I, (2, 8) = 0.+0.*I, (3, 1) = 0.+0.*I, (3, 2) = 0.+0.*I, (3, 3) = 0.+0.*I, (3, 4) = 1.00000+0.*I, (3, 5) = 0.+0.*I, (3, 6) = 0.+0.*I, (3, 7) = 0.+0.*I, (3, 8) = 0.+0.*I, (4, 1) = 0.+0.*I, (4, 2) = 0.+0.*I, (4, 3) = 0.+0.*I, (4, 4) = 0.+0.*I, (4, 5) = 1.00000+0.*I, (4, 6) = 0.+0.*I, (4, 7) = 0.+0.*I, (4, 8) = 0.+0.*I, (5, 1) = 0.+0.*I, (5, 2) = 0.+0.*I, (5, 3) = 0.+0.*I, (5, 4) = 0.+0.*I, (5, 5) = 0.+0.*I, (5, 6) = 1.00000+0.*I, (5, 7) = 0.+0.*I, (5, 8) = 0.+0.*I, (6, 1) = 0.+0.*I, (6, 2) = 0.+0.*I, (6, 3) = 0.+0.*I, (6, 4) = 0.+0.*I, (6, 5) = 0.+0.*I, (6, 6) = 0.+0.*I, (6, 7) = 1.00000+0.*I, (6, 8) = 0.+0.*I, (7, 1) = 0.+0.*I, (7, 2) = 0.+0.*I, (7, 3) = 0.+0.*I, (7, 4) = 0.+0.*I, (7, 5) = 0.+0.*I, (7, 6) = 0.+0.*I, (7, 7) = 0.+0.*I, (7, 8) = 1.00000+0.*I, (8, 1) = -50.66671+0.*I, (8, 2) = 408.89275+0.*I, (8, 3) = -1487.04408+0.*I, (8, 4) = 2794.94522+0.*I, (8, 5) = -2674.98384+0.*I, (8, 6) = 863.56481+0.*I, (8, 7) = -168.12500+0.*I, (8, 8) = 17.33333+0.*I})

(1.4.6)

Digits := 100;
LinearAlgebra:-Eigenvalues( A42 );

Digits := 100

 

Eigenvalues: calling external function
Eigenvalues: initializing the output object
Eigenvalues: using software external library
Eigenvalues: CLAPACK sw_zgeevx_

 

Vector[column](%id = 18446745881317227806)

(1.4.7)

Digits := 250;
LinearAlgebra:-Eigenvalues( A42 );

Digits := 250

 

Eigenvalues: calling external function
Eigenvalues: initializing the output object
Eigenvalues: using software external library
Eigenvalues: CLAPACK sw_zgeevx_

 

Vector[column](%id = 18446745881356880102)

(1.4.8)

 

 

 

 

 

 

 

 

 

 

``


 

Download Problems_LinearAlgebra_Eigenvalues.mw

How to get the functional form of interpolation in the given example below

 

GP.mw

Hi, 

The procedure Statistics:-ChiSquareSuitableModelTest returns wrong or stupid results in some situations.
The stupid answer can easily be avoided if the user is careful enough.
The wrong answer is more serious: the standard deviation (in the second case below) is not correctly estimated.

PS: the expression "CORRECT ANSWER" is a short for "POTENTIALLY CORRECT ANSWER" given that what ChiSquareSuitableModelTest really does is not documented
 

restart:

with(Statistics):

randomize():

N := 100:
S := Sample(Normal(0, 1), N):

infolevel[Statistics] := 1:

# 0 parameter to fit from the sample S  CORRECT ANSWER

ChiSquareSuitableModelTest(S, Normal(0, 1), level = 0.5e-1):
print():

Chi-Square Test for Suitable Probability Model
----------------------------------------------
Null Hypothesis:
Sample was drawn from specified probability distribution
Alt. Hypothesis:
Sample was not drawn from specified probability distribution
Bins:                    10
Degrees of freedom:      9
Distribution:            ChiSquare(9)
Computed statistic:      15.8
Computed pvalue:         0.0711774
Critical value:          16.9189774487099
Result: [Accepted]
This statistical test does not provide enough evidence to conclude that the null hypothesis is false

 

(1)

# 2 parameters (mean and standard deviation) to fit from the sample S  INCORRECT ANSWER

ChiSquareSuitableModelTest(S, Normal(a, b), level = 0.5e-1, fittedparameters = 2):


print():
# verification
m := Mean(S);
s := StandardDeviation(S);
t := sqrt(add((S-~m)^~2) / (N-1));

print():
error "the estimation of the StandardDeviation ChiSquareSuitableModelTest is not correct";
print():

Chi-Square Test for Suitable Probability Model

----------------------------------------------
Null Hypothesis:
Sample was drawn from specified probability distribution
Alt. Hypothesis:
Sample was not drawn from specified probability distribution
Model specialization:    [a = -.2143e-1, b = .8489]
Bins:                    10
Degrees of freedom:      7
Distribution:            ChiSquare(7)
Computed statistic:      3.8
Computed pvalue:         0.802504
Critical value:          14.0671405764057
Result: [Accepted]
This statistical test does not provide enough evidence to conclude that the null hypothesis is false

 

 

HFloat(-0.021425681632689854)

 

HFloat(0.8531979363682092)

 

HFloat(0.8531979363682094)

 

 

Error, the estimation of the StandardDeviation ChiSquareSuitableModelTest is not correct

 

(2)

# ONLY 1 parameter (mean OR standard deviation ?) to fit from the sample S  STUPID ANSWER
#
# A stupid answer: the parameter to fit not being declared, the procedure should return
# an error of the type "don(t know what is the paramater tio fit"
ChiSquareSuitableModelTest(S, Normal(a, b), level = 0.5e-1, fittedparameters = 1):


print():
WARNING("ChiSquareSuitableModelTest should return it can't fit a single parameter");
print():

Chi-Square Test for Suitable Probability Model

----------------------------------------------
Null Hypothesis:
Sample was drawn from specified probability distribution
Alt. Hypothesis:
Sample was not drawn from specified probability distribution
Model specialization:    [a = -.2143e-1, b = .8489]
Bins:                    10
Degrees of freedom:      8
Distribution:            ChiSquare(8)
Computed statistic:      3.8
Computed pvalue:         0.874702
Critical value:          15.5073130558655
Result: [Accepted]
This statistical test does not provide enough evidence to conclude that the null hypothesis is false

 

 

Warning, ChiSquareSuitableModelTest should return it can't fit a single parameter

 

(3)

ChiSquareSuitableModelTest(S, Normal(a, 1), level = 0.5e-1, fittedparameters = 1):  #CORRECT ANSWER
print():

# verification
m := Mean(S);
print():

Chi-Square Test for Suitable Probability Model

----------------------------------------------
Null Hypothesis:
Sample was drawn from specified probability distribution
Alt. Hypothesis:
Sample was not drawn from specified probability distribution
Model specialization:    [a = -.2143e-1]
Bins:                    10
Degrees of freedom:      8
Distribution:            ChiSquare(8)
Computed statistic:      16.4
Computed pvalue:         0.0369999
Critical value:          15.5073130558655
Result: [Rejected]
This statistical test provides evidence that the null hypothesis is false

 

 

HFloat(-0.021425681632689854)

 

(4)

ChiSquareSuitableModelTest(S, Normal(0, b), level = 0.5e-1, fittedparameters = 1):  #CORRECT ANSWER

print():
# verification
s := sqrt((add(S^~2) - 0^2) / N);
print():

Chi-Square Test for Suitable Probability Model

----------------------------------------------
Null Hypothesis:
Sample was drawn from specified probability distribution
Alt. Hypothesis:
Sample was not drawn from specified probability distribution
Model specialization:    [b = .8492]
Bins:                    10
Degrees of freedom:      8
Distribution:            ChiSquare(8)
Computed statistic:      6.4
Computed pvalue:         0.60252
Critical value:          15.5073130558655
Result: [Accepted]
This statistical test does not provide enough evidence to conclude that the null hypothesis is false

 

 

HFloat(0.8491915633531496)

 

(5)

 


 

Download ChiSquareSuitableModelTest.mw

Dear Users!

I have made a code using loops. But when I exceute it I go unwanted expression please see the files and try to fix it. I shall be very thankful. 

 

Help.mw

Special request to:

@acer @Kitonum @Preben Alsholm @Carl Love

Hi,

I seeking for informations on the Statistics:-ChiSquareSuitableModelTest procedure:

  1. Once you have choose the number of bins, what strategy does this procedure use to define the bins (equal width, equal probability, other one?).
     
  2. It seems the procedure accepts any value for this number of bins and that its correct use then is under the sole responsability of the user. Am I right?


In the book below (but I'm sure this can also be found on the web) there is a detailed discussion concerning "good practices" in using the Chi-Square goodness of fit test: does anyone known is something comparable is used in ChiSquareSuitableModelTest ?

Statistical methods in experimental physics, W.T.Eadie, D. Drijard, F.F.James, M. Roos, B. Sadoulet
North-Holland 1971
Paragraph 11.2.3 "choosing optimal bin size"


Thanks in advance

I am writing a maths books using maple now. It is fantastic to use maple for writing books in maths.
 

 

 

 in the polynomial x^3-3*x^2-33*x+35 This line is not copying in full line!!
Step 1: Find the sum of all the coefficients in the polynomial x^3-3*x^2-33*x+35 This line is copying in full!!
"= 1-3-33+35 = 0"
                                                 r x-1is a factor  ; 1 is a root of the polynomial.
In the next row, I copy pasted the lines above

 in the polynomial x^3-3*x^2-33*x+35 This line is not copying in full line!!

Step 1: Find the sum of all the coefficients in the polynomial x^3-3*x^2-33*x+35 This line is copying in full!!

"= 1-3-33+35 = 0"
                                                 r x-1is a factor  ; 1 is a root of the polynomial.
In the next row, I copy pasted the lines above

 

 

 

Can any one find the reason?

 

 

``


 

Download cannotCopyWhy.mw

I enclose a part of my document where in I made a particular line with text and maths formats combined.Then I made changes in the line. Now copy paste does work only for the later half (both text and maths formats). The corrected first part is not being copied.

How do I do the corrections properly so that copy paste is not a problem at laer stages.

Thanks for the answer.

Ramakrishnan V

My problem is related to recovering orbits from invariant polynomials, and their ideal of relations.

The invariant polynomials I obtained are:

u = x2 - x y + y2,
v = 2 x6 - 6 x5 y + 15 x4 y2 - 20 x3 y3 + 15 x2 y4 - 6 x y5 +  2 y6 ,
w = x6 - 4 x5 y + 10 x4 y2 - 10 x3 y3 + 5 x2 y4 - 2 x y5 + y6 .

Using the logic from the Cox et al. book I got that the algebraic relation (ideal of relations) between the invariants, which is:

11 u6 - 10 u3 v + 3 (v2 - v w + w2) = 0

Then, using Reduce[] (exact symbolic solver which uses cylindrical algebraic decomposition) from Mathematica I solved for x and y under the assumption x > y > 0, u > 0, v > 0 and w > 0, but I got rather a complex solution.


My question is whether there is a way to try getting something more straightforward than the solution given by Mathematica.
 

I tried to use Maple's solve function, but it immediately stops without any result of an error message.


My input for Reduce is:

Reduce[{x2 - x y + y2 == u, 2 x6 - 6 x5 y + 15 x4 y2 - 20 x3 y3 + 15 x2 y4 - 6 x y5 + 2 y6 == v,  x6 - 4 x5 y + 10 x4 y2 - 10 x3 y3 + 5 x2 y4 - 2 x y5 + y6 == w, 11 u6 - 10 u3 v + 3 (v2 - v w + w2) == 0, x > y > 0, u > 0, v > 0, w > 0}, {x, y}, Complexes]

 

and my input for solve:

 

solve({u = x^2 - x*y + y^2, v = 2*x^6 - 6*x^5*y + 15*x^4*y^2 - 20*x^3*y^3 + 15*x^2*y^4 - 6*x*y^5 + 2*y^6, w = x^6 - 4*x^5*y + 10*x^4*y^2 - 10*x^3*y^3 + 5*x^2*y^4 - 2*x*y^5 + y^6, 11*u^6 - 10*u^3*v + 3*v^2 - 3*v*w + 3*w^2 = 0, 0 < u, 0 < v, 0 < w, 0 < x, 0 < y, y < x}, {x, y})

 

Do you know what I am doing wrong, or what else could I try?

 

Hello Anybody can help me to write codes for PDE to solve by Galerkin finite element method or any other methods can be able to gain results? parameter omega is unknown and should be determined.

I attached a pdf file for more .

Thanks so much

fem2
 

"restart:  rho:=7850:  E:=0.193e12:  n:=1:  AD:=10:  upsilon:=0.291:   mu:=E/(2*(1+upsilon)):  l:=0:  lambda:=E*upsilon/((1+upsilon)*(1-2*upsilon)):  R:=2.5:  ii:=2:  J:=2:       m:=1:       `u__theta`(r,theta,phi):= ( V(r,theta))*cos(m*phi):  `u__r`(r,theta,phi):= ( U(r,theta))*cos(m*phi): `u__phi`(r,theta,phi):= ( W(r,theta))*sin(m*phi):  :        eq1:=(r (R+r cos(theta))^2 (mu+lambda) (((&PartialD;)^2)/(&PartialD;r&PartialD;theta) `u__theta`(r,theta,phi))+2 r^2 (mu+lambda/2) (R+r cos(theta))^2 (((&PartialD;)^2)/(&PartialD;r^2) `u__r`(r,theta,phi))+r^2 (mu+lambda) (R+r cos(theta)) (((&PartialD;)^2)/(&PartialD;phi&PartialD;r) `u__phi`(r,theta,phi))+mu (R+r cos(theta))^2 (((&PartialD;)^2)/(&PartialD;theta^2) `u__r`(r,theta,phi))+(((&PartialD;)^2)/(&PartialD;phi^2) `u__r`(r,theta,phi)) mu r^2-3 (R+r cos(theta))^2 (mu+lambda/3) ((&PartialD;)/(&PartialD;theta) `u__theta`(r,theta,phi))+2 r (mu+lambda/2) (R+2 r cos(theta)) (R+r cos(theta)) ((&PartialD;)/(&PartialD;r) `u__r`(r,theta,phi))-r^2 sin(theta) (mu+lambda) (R+r cos(theta)) ((&PartialD;)/(&PartialD;r) `u__theta`(r,theta,phi))-3 r^2 cos(theta) (mu+lambda/3) ((&PartialD;)/(&PartialD;phi) `u__phi`(r,theta,phi))-r mu sin(theta) (R+r cos(theta)) ((&PartialD;)/(&PartialD;theta) `u__r`(r,theta,phi))-2 (mu+lambda/2) (2 (cos(theta))^2 r^2+2 cos(theta) R r+R^2) `u__r`(r,theta,phi)+r `u__theta`(r,theta,phi) sin(theta) (3 r (mu+lambda/3) cos(theta)+R mu))/(r^2 (R+r cos(theta))^2):  eq2:=(2 (mu+lambda/2) (R+r cos(theta))^2 (((&PartialD;)^2)/(&PartialD;theta^2) `u__theta`(r,theta,phi))+r (R+r cos(theta))^2 (mu+lambda) (((&PartialD;)^2)/(&PartialD;r&PartialD;theta) `u__r`(r,theta,phi))+r (mu+lambda) (R+r cos(theta)) (((&PartialD;)^2)/(&PartialD;phi&PartialD;theta) `u__phi`(r,theta,phi))+r^2 mu (R+r cos(theta))^2 (((&PartialD;)^2)/(&PartialD;r^2) `u__theta`(r,theta,phi))+(((&PartialD;)^2)/(&PartialD;phi^2) `u__theta`(r,theta,phi)) mu r^2+3 (R+r cos(theta)) ((4 r (mu+lambda/2) cos(theta))/3+R (mu+lambda/3)) ((&PartialD;)/(&PartialD;theta) `u__r`(r,theta,phi))-2 r (mu+lambda/2) sin(theta) (R+r cos(theta)) ((&PartialD;)/(&PartialD;theta) `u__theta`(r,theta,phi))+r mu (R+2 r cos(theta)) (R+r cos(theta)) ((&PartialD;)/(&PartialD;r) `u__theta`(r,theta,phi))+3 r^2 sin(theta) (mu+lambda/3) ((&PartialD;)/(&PartialD;phi) `u__phi`(r,theta,phi))+(-3 r R (mu+lambda/3) cos(theta)+(-lambda-2 mu) r^2-R^2 mu) `u__theta`(r,theta,phi)-2 r (mu+lambda/2) sin(theta) R `u__r`(r,theta,phi))/(r^2 (R+r cos(theta))^2):  eq3:=(r (mu+lambda) (R+r cos(theta)) (((&PartialD;)^2)/(&PartialD;phi&PartialD;theta) `u__theta`(r,theta,phi))+r^2 (mu+lambda) (R+r cos(theta)) (((&PartialD;)^2)/(&PartialD;phi&PartialD;r) `u__r`(r,theta,phi))+mu (R+r cos(theta))^2 (((&PartialD;)^2)/(&PartialD;theta^2) `u__phi`(r,theta,phi))+r (r mu (R+r cos(theta))^2 (((&PartialD;)^2)/(&PartialD;r^2) `u__phi`(r,theta,phi))+2 r (mu+lambda/2) (((&PartialD;)^2)/(&PartialD;phi^2) `u__phi`(r,theta,phi))+(4 r (mu+lambda/2) cos(theta)+R (mu+lambda)) ((&PartialD;)/(&PartialD;phi) `u__r`(r,theta,phi))+mu (R+2 r cos(theta)) (R+r cos(theta)) ((&PartialD;)/(&PartialD;r) `u__phi`(r,theta,phi))-mu sin(theta) (R+r cos(theta)) ((&PartialD;)/(&PartialD;theta) `u__phi`(r,theta,phi))-r (3 sin(theta) (mu+lambda/3) ((&PartialD;)/(&PartialD;phi) `u__theta`(r,theta,phi))+`u__phi`(r,theta,phi) mu)))/(r^2 (R+r cos(theta))^2):  "

EQ1 := collect(eq1, cos(m*phi))/cos(m*phi)+rho*omega^2; EQ2 := collect(eq2, cos(m*phi))/cos(m*phi)+rho*omega^2; EQ3 := collect(eq3, sin(m*phi))/sin(m*phi)+rho*omega^2

(0.1788235818e12*r*(2.5+r*cos(theta))^2*(diff(diff(V(r, theta), r), theta))+0.2535718390e12*r^2*(2.5+r*cos(theta))^2*(diff(diff(U(r, theta), r), r))+0.1788235818e12*r^2*(2.5+r*cos(theta))*(diff(W(r, theta), r))+0.7474825716e11*(2.5+r*cos(theta))^2*(diff(diff(U(r, theta), theta), theta))-0.7474825716e11*U(r, theta)*r^2-0.3283200960e12*(2.5+r*cos(theta))^2*(diff(V(r, theta), theta))+0.2535718390e12*r*(2.5+2.*r*cos(theta))*(2.5+r*cos(theta))*(diff(U(r, theta), r))-0.1788235818e12*r^2*sin(theta)*(2.5+r*cos(theta))*(diff(V(r, theta), r))-0.3283200960e12*r^2*cos(theta)*W(r, theta)-0.7474825716e11*r*sin(theta)*(2.5+r*cos(theta))*(diff(U(r, theta), theta))-0.2535718390e12*(2.*cos(theta)^2*r^2+5.0*r*cos(theta)+6.25)*U(r, theta)+r*V(r, theta)*sin(theta)*(0.3283200960e12*r*cos(theta)+0.1868706429e12))/(r^2*(2.5+r*cos(theta))^2)+7850*omega^2

 

(0.2535718390e12*(2.5+r*cos(theta))^2*(diff(diff(V(r, theta), theta), theta))+0.1788235818e12*r*(2.5+r*cos(theta))^2*(diff(diff(U(r, theta), r), theta))+0.1788235818e12*r*(2.5+r*cos(theta))*(diff(W(r, theta), theta))+0.7474825716e11*r^2*(2.5+r*cos(theta))^2*(diff(diff(V(r, theta), r), r))-0.7474825716e11*V(r, theta)*r^2+3.*(2.5+r*cos(theta))*(0.1690478927e12*r*cos(theta)+0.2736000800e12)*(diff(U(r, theta), theta))-0.2535718390e12*r*sin(theta)*(2.5+r*cos(theta))*(diff(V(r, theta), theta))+0.7474825716e11*r*(2.5+2.*r*cos(theta))*(2.5+r*cos(theta))*(diff(V(r, theta), r))+0.3283200960e12*r^2*sin(theta)*W(r, theta)+(-0.8208002400e12*r*cos(theta)-0.2535718389e12*r^2-0.4671766072e12)*V(r, theta)-0.6339295976e12*r*sin(theta)*U(r, theta))/(r^2*(2.5+r*cos(theta))^2)+7850*omega^2

 

(-0.1788235818e12*r*(2.5+r*cos(theta))*(diff(V(r, theta), theta))-0.1788235818e12*r^2*(2.5+r*cos(theta))*(diff(U(r, theta), r))+0.7474825716e11*(2.5+r*cos(theta))^2*(diff(diff(W(r, theta), theta), theta))+r*(0.7474825716e11*r*(2.5+r*cos(theta))^2*(diff(diff(W(r, theta), r), r))-0.2535718390e12*r*W(r, theta)-1.*(0.5071436780e12*r*cos(theta)+0.4470589545e12)*U(r, theta)+0.7474825716e11*(2.5+2.*r*cos(theta))*(2.5+r*cos(theta))*(diff(W(r, theta), r))-0.7474825716e11*sin(theta)*(2.5+r*cos(theta))*(diff(W(r, theta), theta))-1.*r*(-0.3283200960e12*sin(theta)*V(r, theta)+0.7474825716e11*W(r, theta))))/(r^2*(2.5+r*cos(theta))^2)+7850*omega^2

(1)

#BCs can be from following
``
U(0, theta) = 0, (D[1](U))(0, theta) = 0, U(1, theta) = 0, (D[1](U))(1, theta) = 0

U(0, theta) = 0, (D[1](U))(0, theta) = 0, U(1, theta) = 0, (D[1](U))(1, theta) = 0

(2)

NULL
V(0, theta) = 0, (D[1](V))(0, theta) = 0, V(1, theta) = 0, (D[1](V))(1, theta) = 0
NULL
W(0, theta) = 0, (D[1](W))(0, theta) = 0, W(1, theta) = 0, (D[1](W))(1, theta) = 0
``

V(0, theta) = 0, (D[1](V))(0, theta) = 0, V(1, theta) = 0, (D[1](V))(1, theta) = 0

 

W(0, theta) = 0, (D[1](W))(0, theta) = 0, W(1, theta) = 0, (D[1](W))(1, theta) = 0

(3)

``


 

Download fem2

buchanan2005.pdf

 

 

I'm working towards creating a way to visualise real polynomial ideals! (or at least the solutions of the polynomials in the ideals) this code creates a plot showing the solutions to all the polynomials in the ideal generated by P1 and P2 (these are specified in the code)

with(plots);
P1 := x^2+2*y^2-3;
solve(P1, y);
Plot1 := plot([%], x = -2 .. 2);

P2 := -2*x^2+2*x*y+3*y^2+x-4;
solve(%, y);
Plot2 := plot([%], x = -4 .. 2);

P2*a+P1;
solve(%, y);
seq(plot([%], x = -4 .. 2), a = 0 .. 10, .1);
display(%, Plot1, Plot2)




This is because when you multiply two polynomials their set of solution curves is just the union of the sets of curves associated with the previous polynomials.

For the next step I'd like to create a graph of the solutions associated with an ideal with three generators. To stop this from being excessively messy I'd like to do it with the RGB value of the colour of a curve is determined by  a and b where the formula for a generic polynomial that we are solving and graphing is given by:

P1+a*P2+b*P3;

where P3 is given by

P3 := x*y-3

I've tried various ways to use cury to make this work (my intuition is cury is the right function to use here)  but got no where. Any ideas how to procede?

Which sorting related with famous sequence

for example 

sorting differential equation in a list

then access the list with famous sequence as index such as using https://oeis.org/

after access with sequence as index, use choose function to get combinations then most result are isomorphism differential ideals?

is there methods about this sorting in Richard Stanley Combinatiric book? which page of it?

Last month I still can read file

by 

read “c://Users//hello//Documents//h.m”

but

now it return error

no read access c://Users//hello//Documents/

and 

in security I add the m file into readable 

I saw open file at c drive has many shell folders 

i just add m file

but still the same error

i unencrypted m file by window properties

still the same error

i save file into maple roaming directory under 12 folder , still the same error

i save into maple installation directory maple 12 , still the same error

possible to solve following equation with unknown parameter omega.

parameter constant.

I see before for one dimension ode this type equation was solved.

Now for 2d equation is possible?

can consider or I can send again.

Best

2d-2

 

Why am I not able to use my MaplePrimes login credentials to login into MapleCloud?

A few months ago i completely lost one of my linux operating systems in a single line of commands I entered into the terminal, and at some point I want to utilize the StringTools package with commands like  RegSubs and RegMatch to output the matching strings that match for the current command line content in a linux terminal, so I will know before I hit the enter key how stupid it was of me to do so *prior* to hitting the enter key.

 

The part I have no idea about is the piping of the keyboard input  for a terminal window to the maple session that will output the strings matching as previously described. I'm sorry if this question is not very clear I will try clarify more this afternoon. 

 

 

I have the following PDE

                         ...(1)

 

My Question: I have done manually following calculations. I want to verify the following operations are right, or not by MAPLE. Could you help me, please?

 

The METHOD:

Suppose that

                         ...(2)

In here,  is an Nx1 matrix, P, C are NxN matrices. (N is an integer and superscript T   denotes the transpose of the matrix.)  and P are given matrices. But the matrix C is ungiven I will find it in the final step. But my question doesn' t include all steps. I just wonder how to calculate the first two steps by Maple.

 

( If Maple doesn' t do matrix algebra, we can treat them as if , P, C were not matrix. I think the result won' t be changed. We will get again equation 9 by Maple.)

First Step

We will find the followings 

 

 in terms of the matrices  ,  P and C.

So, if we integrate Equation (2) with respect to x (from 0 to x), and  by using the following two assumptions

 

we have 

   ...(3)
 

substituting x=1  in Equation (3)

 ...(4)

if rewrite Eqn. (4), we have

...(5)

substituting Eqn. (5) to Eqn. (3), we have 

...(6)

integrating Equation (3) with respect to t,

we have 

...(7)

If we integrate Equation (2) from 0 to x with respect to t, we have

...(8)

Second Step We will substitute the terms to the pde ( Equation 1)

Substituting Eqn. (6), (7), (8) to Eqn. (1), we have finally

...(9)

I want to do the above calculations by Maple.  

Because I have more complex questions than above, I want to write a Maple code in order to avoid calculation errors.  

Final Step for curious: it's hard to explain the whole method here. Briefly, we will discretize equation 9 for some collocation points t and x. And after doing it, we will have a system of an algebraic equation. (N equation and N unknown ( C is Nx1 unknown vector to be find) )

And then we will substitute vector C to Eqn. 7

Code for Matrices , P^1, P^2,etc.

code.mw 

Best Regards...

First 7 8 9 10 11 12 13 Last Page 9 of 253