Difference between revisions of "Manuals/calci/MMULT"

From ZCubes Wiki
Jump to navigation Jump to search
(Created page with "<div id="6SpaceContent" class="zcontent" align="left"> '''MMULT'''(Array1, Array2) where, '''Array1, Array2......''' - are represents arrays. </div> ---- <div ...")
 
Line 1: Line 1:
<div id="6SpaceContent" class="zcontent" align="left">
+
<div style="font-size:30px">'''MMULT(a1,A2)'''</div><br/>
 +
*where a1 and a2 the array if two matrices
  
'''MMULT'''(Array1, Array2)
+
==Description==
 +
*This function gives product of two matrices.Matrix multiplication is of two types:Type1: A scalar (a constant) is multiplied with the each element of the matrix.
 +
*Type 2: multiplication of two matrices. We can do the matrix multiplication when  the number of columns in the first matrix equals the number of rows in the second matrix.
 +
*For e.g. 4x2 matrix can multiply with 2x3. The matrix  product of two arrays a and b is xij= summation of k=1 to n aik.bkj, where i ts the row number and j is the colun number.
 +
*i.e Multiply the elements of each row of 1st matrix by elements of each column of 2nd matrix.
 +
*So the resultant matrix of the order is:Rows of 1st matrix × Columns of 2nd. For e.g .
 +
*If we multiply a4x2 matrix with a 2x3 matrix, the product matrix is 4x3 .
 +
*This function will give the result as error when:
 +
#The number of columns in the 1st matrix is not equal to number of rows in the 2nd matrix.
 +
#In the range cell, any cells are empty or that should not be convert in to numbers.
  
where,
+
==Examples==
 +
A student investigated the chance of getting viral fever in a school for a period that took vitamin tablets every day. The total number of students 880. In that 639 students didn't get viral fever and 241 students got fever .But the expected ratio is 1:3<br/>
 +
'''Answer'''
 +
*If the ratio is 1:3 and the total number of observed individuals is 880, then the expected numerical values should be: 660 will not get fever and 220 students will get fever. 
  
'''Array1, Array2......''' - are represents arrays.
+
{| class="wikitable" style="width:50%"
 
+
|-  
</div>
+
!
----
+
! No Fever
<div id="1SpaceContent" class="zcontent" align="left">
+
! Get Fever
 
+
|-
It returns the matrix product of two arrays.
+
! Observed Values
 
+
| 639
'''Formula''' :-
+
| 241
 
+
|-
MMULT = Σb<sub>ik</sub>c<sub>kj</sub>
+
! Expected Values
 
+
| 660
</div>
+
| 220
----
+
|-
<div id="7SpaceContent" class="zcontent" align="left">
+
! <math>\frac{(oi-ei)^2}{ei}</math>
 
+
| 0.668
If Array1, Array2......... have different set of data points , MMULT returns #ERROR.
+
| 2
 
+
|}
If any  cell is empty, returns NaN.
 
 
 
</div>
 
----
 
<div id="12SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="left">
 
 
 
MMULT
 
  
</div></div>
+
*The <math>\chi^2</math> value is 2.668
----
+
*Now <math>df=(r-1)(c-1) = (2-1)(2-1) = 1 </math>
<div id="8SpaceContent" class="zcontent" align="left">
+
*From the Chi Squared Distribution probability table with <math>df</math> is 1, the <math>\chi^2</math> value of 2.668 is  0.10.<br/>
 +
CHITEST(or,er) = 0.10
  
Lets see an example in (Column2, Row5)
+
==See Also==
  
<nowiki>=MMULT(R1C1:R2C2, R3C1:R4C2)</nowiki>
+
*[[Manuals/calci/CHIDIST | CHIDIST]]
 
 
MMULT returns array[23,47,30,62].
 
 
 
</div>
 
----
 
<div id="10SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Syntax </div><div class="ZEditBox"><center></center></div></div>
 
----
 
<div id="4SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Remarks </div></div>
 
----
 
<div id="3SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Examples </div></div>
 
----
 
<div id="11SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Description </div></div>
 
----
 
<div id="2SpaceContent" class="zcontent" align="left">
 
 
 
{| id="TABLE3" class="SpreadSheet blue"
 
|- class="even"
 
| class=" " |
 
| class="  " | Column1
 
| Column2
 
| Column3
 
| Column4
 
|- class="odd"
 
| class=" " | Row1
 
| class=" " | 1
 
| class=" " | 5
 
|
 
|
 
|- class="even"
 
| class="  " | Row2
 
| class=" " | 2
 
| class=" " | 6
 
|
 
|
 
|- class="odd"
 
| Row3
 
| class="                                                    sshl_f " | 3
 
| class=" " | 7
 
|
 
|
 
|- class="even"
 
| Row4
 
| class=" " | 4
 
| class=" " | 8
 
|
 
|
 
|- class="odd"
 
| class=" " | Row5
 
| class="  " |
 
| class="sshl_f" | 23,47,30,62
 
|
 
|
 
|- class="even"
 
| Row6
 
|
 
| class=" SelectTD ChangeBGColor SelectTD" |
 
<div id="2Space_Handle" class="zhandles" title="Click and Drag to resize CALCI Column/Row/Cell. It is EZ!"></div><div id="2Space_Copy" class="zhandles" title="Click and Drag over to AutoFill other cells."></div><div id="2Space_Drag" class="zhandles" title="Click and Drag to Move/Copy Area.">[[Image:copy-cube.gif]]  </div>
 
|
 
|
 
|}
 
  
<div align="left">[[Image:calci1.gif]]</div></div>
+
==References==
----
+
[http://en.wikipedia.org/wiki/Chi-squared_distribution  CHI-SQUARE Distribution]

Revision as of 04:18, 26 November 2013

MMULT(a1,A2)


  • where a1 and a2 the array if two matrices

Description

  • This function gives product of two matrices.Matrix multiplication is of two types:Type1: A scalar (a constant) is multiplied with the each element of the matrix.
  • Type 2: multiplication of two matrices. We can do the matrix multiplication when the number of columns in the first matrix equals the number of rows in the second matrix.
  • For e.g. 4x2 matrix can multiply with 2x3. The matrix product of two arrays a and b is xij= summation of k=1 to n aik.bkj, where i ts the row number and j is the colun number.
  • i.e Multiply the elements of each row of 1st matrix by elements of each column of 2nd matrix.
  • So the resultant matrix of the order is:Rows of 1st matrix × Columns of 2nd. For e.g .
  • If we multiply a4x2 matrix with a 2x3 matrix, the product matrix is 4x3 .
  • This function will give the result as error when:
  1. The number of columns in the 1st matrix is not equal to number of rows in the 2nd matrix.
  2. In the range cell, any cells are empty or that should not be convert in to numbers.

Examples

A student investigated the chance of getting viral fever in a school for a period that took vitamin tablets every day. The total number of students 880. In that 639 students didn't get viral fever and 241 students got fever .But the expected ratio is 1:3
Answer

  • If the ratio is 1:3 and the total number of observed individuals is 880, then the expected numerical values should be: 660 will not get fever and 220 students will get fever.
No Fever Get Fever
Observed Values 639 241
Expected Values 660 220
0.668 2
  • The value is 2.668
  • Now
  • From the Chi Squared Distribution probability table with is 1, the value of 2.668 is 0.10.

CHITEST(or,er) = 0.10

See Also

References

CHI-SQUARE Distribution