Precious Metals Forum

Go Back   Precious Metals Forum > Bunker Talk > STS

Like Tree6Likes
  • 1 Post By Aubuy
  • 1 Post By benjamen
  • 1 Post By DCFusor
  • 1 Post By benjamen
  • 1 Post By ancona
  • 1 Post By benjamen

Reply
 
LinkBack Thread Tools
Old 04-30-2013, 05:28 PM   #1
PM Bug Supporter
 
DoChenRollingBearing's Avatar
 
Join Date: Oct 2011
Location: SE USA
Posts: 1,275
Liked: 691 times
Math Question... No. 1?

I have asked a few people I know and some I do not (at Zero Hedge), and I have been unable to get any kind of an answer... One (well three...) is just for my curiosity (below), the other I will ask if our lil ol PMBug.com forum responds positively...

1) Regarding square matrices (linear algebra), I know there are plenty of applications for two-dimensional ones, I use such applications about once every month or two (in statistical analysis of our bearing company sales). My question is: are there any applications for three-dimensional (and by extension, higher order) matrices? And how would one go about making the relevant calculations (the equivalent of determinants, eigenvalues and eigenvectors)? Are there any textbooks on this?

Thanks! I am kind-of amazed that the idea of three dimensional matrices has mystified so many people, this is the first "math thing" I have looked into that no one has (yet) been able to help me with or even know anything about it.
DoChenRollingBearing is offline   Reply With Quote
Old 04-30-2013, 05:53 PM   #2
Golden Cockroach
 
PMBug's Avatar
 
Join Date: Oct 2011
Location: In Scrooge McDuck's vault
Posts: 7,029
Liked: 2449 times
Is this what you had in mind?

http://3dgep.com/?p=259

Pretty sure they use 3d matrices in 3D graphics applications.

It's possible they are also used in the 3D physics engines for first person shooters like Halo, etc.
__________________
The journey of a thousand miles begins with a single step. - Lao Tzu

Important stuff: PMBug 101 * Forum Guidelines * Support PMBug
PMBug is offline   Reply With Quote
Old 04-30-2013, 06:19 PM   #3
Ground Beetle
 
Join Date: Apr 2013
Posts: 501
Liked: 304 times
The matrices have always mystified people although it does have it's fans. Google "Keanu Reeves" and "two dimensional" and I think you will understand the problem.
PMBug likes this.
Aubuy is offline   Reply With Quote
Old 04-30-2013, 07:29 PM   #4
Super Moderator
 
benjamen's Avatar
 
Join Date: Mar 2012
Location: Migratory
Posts: 1,620
Liked: 685 times
Something like the following?

Given:
A) number of mortgage loans in the following states:
1) payments are current
2) payments are 1-60 days past due (DPD)
3) payments are 61-120 DPD
4) payments are 120+ DPD
B) historical average monthly roll from every state to every other state

Wanted: number of loans that will be in state 2 in six months

Roll Rate Solution:
Use 1x4 starting matrix, 4x4 roll rate matrix, and a month counting index

If you wanted to add another dimension could add an index for loan interest rate, state the property resides, ect.
__________________
I drive men mad
For love of me,
Easily beaten,
Never free.

PMBug 101 *** Forum Rules

Last edited by benjamen; 04-30-2013 at 07:40 PM.
benjamen is offline   Reply With Quote
Old 04-30-2013, 07:31 PM   #5
Yellow Jacket
 
DCFusor's Avatar
 
Join Date: Nov 2011
Location: Floyd, Virginia
Posts: 1,682
Liked: 1233 times
Matrices are generally useful for solving systems of *linear* equations, which can extend to any dimensionality. Some people use complex numbers to make a separate Y from X axis in two dim ones. But that technique does not extend simply to 3 or more, though most of the calculations are fairly straightforward. I do have issues keeping my own understanding of it all in my own head, so don't feel bad. I have to crack the books almost every time. Some matrices, even simple ones, are non-invertable (you get into divide by zero issues) and that's a real bitch when a tiny number that is mostly noise and not meaningful gets "blown up" by dividing by "almost zero" and there have to be some "hacks" in computer code to handle the special cases. I could recommend some books I use, but...they'd most likely just make your head hurt (all about training neural nets, which is very matix-intense).

Neural nets are non linear, so the matrix techniques just get you close, then you have to do gradient descent stuff, and even then, a local error minimum might not be the global one. There's some real tough math in there, but I hope to someday adapt it for trading, since it'd be so much smarter than the idiotic algo's you see operating on nanex - and be able to predict their moves better than I do.
DCFusor is offline   Reply With Quote
Old 04-30-2013, 08:47 PM   #6
PM Bug Supporter
 
DoChenRollingBearing's Avatar
 
Join Date: Oct 2011
Location: SE USA
Posts: 1,275
Liked: 691 times
I have some comments and clarifications:

1) I think what I want is an actual example of a 3-D matrix to work with, not just adding another row & column to a 2-D matrix. I do NOT want (both immediately below are 2-dimensional matrices):

A11 A12
A21 A22

goes to, upon adding another variable ("variable 3") say...:

A11 A12 A13
A21 A22 A23
A31 A32 A33

OK, I am comfortable with above examples of 2-dimensional matrices, I am now working on a procedure called "Factor Analysis", a routine in multivariate statistics that uses eigenvalues and eigenvectors of square matrices, the project I have started is looking at an Excel spreadsheet of 400 customers and 291 different products, so the matrix that "S-Plus" (stats program) will calculate will be large... I have done this before at a slightly smaller scale with less data, but Ameru has had some (positive!) changes in its sales patterns (BIG increases in sales of new brands for example, with new & unusual bearing codes for new vehicles...), and I want to see if they are "structured" differently (eg, what kinds of customers buy our new pieces for Nissan, and which of these new & oddball pieces sell together...). All of this I can do (S-Plus can do) with 2-D matrices.

Again, I have no questions re all of the above.

2) What I do want to know more about is more like the below, again, this is curiosity, I have no application in mind yet:

A11 A12 A13
A21 A22 A23
A31 A32 A33

"on top of"

B11 B12 B13
B21 B22 B23
B31 B32 B33

"on top of"

C11 C12 C13
C21 C22 C23
C31 C32 C33

A 3 * 3 * 3 matrix!

a) Does anybody actually USE these things? For what?

b) How do they do the computations if so?

c) Are there any textbooks for the above that do NOT veer off into wildly complicated theoretical math?

d) Note that the number of calculations would increase even faster in higher-dimensional matrices than adding variables to a 2-D one...

Again, this is all for curiosity! Once in a while, weird things things occur to me that sometimes pan out into interesting fields of endeavor...


***


[Preview: Math Question No. 2 will be about Factor Analysis and sales data]

Last edited by DoChenRollingBearing; 04-30-2013 at 08:58 PM. Reason: Long & complicated post, lots of edits!
DoChenRollingBearing is offline   Reply With Quote
Old 05-01-2013, 07:48 AM   #7
Super Moderator
 
benjamen's Avatar
 
Join Date: Mar 2012
Location: Migratory
Posts: 1,620
Liked: 685 times
Extend my banking example:
Looking at the number of active loans in a bank...
A level: Product type (Mortgage, Auto Loan, Credit Card, ect.)
B level: Source of product (New Customer, Returning Customer, Loan Aquired from another bank, ect.)
C level: Loan deliquency (Current, 1-29 DPD, 30-59 DPD, ect.)

Combining all these levels into a large 3 dimensional matrix, you can have the active number of accounts of every cross section (Acquired, current, credit card or 30-59 DPD, auto loan, new customer). You multiply this 3D matrix by a similar 3D matrix that contains the average monthly roll rates for each Ai, Bi, Ci state to every other state to forecast where in the matrix next months accounts will be located. Do actually do the math, I usually use multiple arrays and do loops in whichever programming language you have handy.
http://www.danzig.us/java_class/dimensions.html
http://www.mathworks.com/help/matlab...al-arrays.html
http://math.hws.edu/javanotes/c7/s5.html

Example to find a single node in forecasted matrix (A1, B1, C1) assuming just a 3x3 matrix
Probability of (A1,B1,C1) rolling to (A1,B1,C1) * # accounts in (A1,B1,C1) +
Probability of (A2,B1,C1) rolling to (A1,B1,C1) * # accounts in (A2,B1,C1) +
Probability of (A3,B1,C1) rolling to (A1,B1,C1) * # accounts in (A3,B1,C1) +
Probability of (A1,B2,C1) rolling to (A1,B1,C1) * # accounts in (A1,B2,C1) +
.
.
.
Probability of (A3,B3,C3) rolling to (A1,B1,C1) * # accounts in (A3,B3,C3) = total # accounts forecasted to be in (A1, B1, C1) next month.
Repeat this procedure for other 8 nodes in this matrix.

As you push any such set up through time it is essentially a Continuous-Time Markov Chain.
http://en.wikipedia.org/wiki/Continu...Markov_process
__________________
I drive men mad
For love of me,
Easily beaten,
Never free.

PMBug 101 *** Forum Rules

Last edited by benjamen; 05-01-2013 at 08:02 AM.
benjamen is offline   Reply With Quote
Old 05-01-2013, 08:15 AM   #8
Yellow Jacket
 
ancona's Avatar
 
Join Date: Nov 2011
Location: Waaay south
Posts: 3,370
Liked: 2046 times
Will this do?

http://www.mathworks.com/help/matlab...al-arrays.html

For graphing:

http://www.w3.org/TR/SVG/intro.html
__________________
All things being equal, the simplest answer is quite often the correct answer - Occam
ancona is offline   Reply With Quote
Old 05-01-2013, 08:22 AM   #9
Yellow Jacket
 
ancona's Avatar
 
Join Date: Nov 2011
Location: Waaay south
Posts: 3,370
Liked: 2046 times
DC,
to follow up, I usually don't need to perform mathematics on a very difficult level. typically, I create maps of underground contaminant plumes based upon "dips" taken at various depths within monitoring wells, which we enter in to a stack matrix on the computer. Sometimes when dealing with a microbial contaminant, we will perform a Spearman to determine rank and order of said contaminant within a given environment relative to its presence [or lack thereof] in the control environment.

In demolition, I do need to use some lower algebra when determining stresses required to topple a given section of a structure once primaries have been sufficiently weakened, and then perhaps some trig to determine where it will end up using differing scenarios for the toppling. Other than that, the rest of it is straight up linear 1+1=2.

*edit*
DCFusor,
You just made my brain hurt. It was like a brain freeze, only with math. ;-)
__________________
All things being equal, the simplest answer is quite often the correct answer - Occam
ancona is offline   Reply With Quote
Old 05-01-2013, 09:58 AM   #10
Super Moderator
 
benjamen's Avatar
 
Join Date: Mar 2012
Location: Migratory
Posts: 1,620
Liked: 685 times
Fun use I designed for a friend: automated PM investing decision making matrix

Simple example version:
Dimension A: Gold/Silver ratio
A1: G/S less than 40 ounces
A2: G/S 40-60 ounces
A3: G/S greater than 60 ounces
Dimension B: Gold/Platinum ratio
B1: PL/G less than 1.2 ounces
B2: PL/G 1.2-1.6 ounces
B3: PL/G greater than 1.8 ounces
Dimension C: Percentage of monthly PM investment
C1: %Gold
C2: %Silver
C3: %Platinum
(note: C1+C2+C3 = 1, but any one entry can be greater 1 or less than 0 to indicate metal to metal transfers on top of regular purchases)

Using this 3D matrix, you can play around with projected holdings based on expected prices and/or ratios. THe one we designed for my friend also included palladium (4D is fun!) and included a "sink" for gold; i.e. his gold holdings could have inflows, but no outflows... he overall gold was to have the most ounces of gold by a certain year, but take advantage of the variations of metal to metal ratios that arise... if he sticks to the matrix, he is less likely to be swayed by day to day hype
__________________
I drive men mad
For love of me,
Easily beaten,
Never free.

PMBug 101 *** Forum Rules
benjamen is offline   Reply With Quote
Old 05-01-2013, 10:14 PM   #11
PM Bug Supporter
 
DoChenRollingBearing's Avatar
 
Join Date: Oct 2011
Location: SE USA
Posts: 1,275
Liked: 691 times
...

Thanks, guys!

I will study your comments and links to see if I can learn something!

EDIT:

I have just finished running a "Factor Analysis" using S-Plus statistical software of our company's sales of our top 248 pieces (all the columns that MS Access would allow in a crosstab query setting this up), those 248 pieces represent about 75% of our sales, and I put that crosstab (sales of each of those pieces vs. our top 400 customers -- 97% of sales, years 2011 - mid-April 2013) into Excel, then loaded it up into S-Plus. I arbitrarily picked 16 factors the first run as that is how many I can print out OK on a sheet in "landscape" using font size 8.

I also ran it picking 25 factors, the last one (No. 25) is the only one with under a 1.0 eigenvalue, so does not provide much additional actionable information for me.

I have had a chance look at the first 10 factors, and most make sense, but I need to check some applications for new Chinese pieces to see if some of those sell together for a reason (say, Nissan perhaps). A couple of the others, at first glance anyway, do not make much sense, but that's what I'll look at tomorrow, you know, when I go to "work"...

Last edited by DoChenRollingBearing; 05-01-2013 at 10:31 PM.
DoChenRollingBearing is offline   Reply With Quote
Old 12-05-2017, 07:45 AM   #12
n00b
 
Join Date: Dec 2017
Posts: 1
Liked: 0 times
Useful resources..

http://www.flowerbrackets.com/two-di...-java-program/
http://www.flowerbrackets.com/java-array/
Jonathhan is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Doing the math: what the FED's 2pct inflation goal and CPI massaging means for your purchasing power swissaustrian Fiat Ponzi 3 04-03-2013 11:10 AM
question Jay Silver Bug 19 03-01-2013 06:35 AM
Question! bugs Silver Bug 5 02-20-2013 08:52 AM
Is my math bad? (Junk silver) oppie2005 Silver Bug 6 10-14-2012 06:59 PM
The Math Behind Italy's 28,000 "Cash For Gold" Outlets Jay Gold Bug 2 08-30-2012 10:21 AM


All times are GMT -5. The time now is 05:09 AM.


Powered by vBulletin® from Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.6.0 PL2 ©2011, Crawlability, Inc.
Content of PMBug.com copyright © 2011 - 2019 Measuring Up. All Rights Reserved.