Wednesday, 27 May 2015

Kogan is BAD.

Kogan is bad. Kogan say they have cheap prices. They do. What they don't tell you is that for that cheap price they expect to be able to flaunt consumer law in your face and get a way with it scot-free.
Good luck to them when ACCC comes knocking. 

My wife bought an expensive camera (a cannon 650D) for $700 a year ago and one day it just stopped working. I said - don't fear my love, the Australian Consumer Law will assist us (Schedule 3 of the Australian Competition and Consumer Act 2010). So we sent Kogan an email with the problem. They said for us to send it in, -They made me pay for the box (which I thought was a bit rough), and now want to charge us for the repair. Given that this expensive camera cost more than $500, the expected durability of such a device is easily 2 years, maybe even 3 (they even offer express warranties of 3 years). So under the consumer laws, there are certain guarantees that cannot be excluded. Reproduced below is my conversation with Kogan:

As I sent in my other email;
Thanks however after performing the suggestion, we are still getting the Err. 30 message.
Will you be able to provide a refund or replacement for this device as per your obligations under the Schedule 2 of the Competition and Consumer Act 2010 (http://www.comlaw.gov.au/Details/C2011C00003/Html/Volume_3#param46) (aka the Australian Consumer Law), whereby the products you sell come with guarantees that cannot be excluded, in particular pertaining to this issue, the guarantee as to acceptable quality (s54 - 2e) with regards to durability. Given that you offer express warranties of 3 years, a reasonable person could reasonably assume a reasonable amount of time for an expensive camera like this to work is at least 3 years. This camera is less than 2 years old.
Please note any shipping costs would be bared by you, should the goods be shown to have a major failure (which I understand to mean, as per s260, the goods are substantially unfit for purpose and cannot easily within a reasonable time be remedied to make them fit for purpose).
Note under the Act, and given the likelihood of major failure, it is our choice as to refund or replacement or repair. I suggest, to save your shipping costs, we move for a refund.
Not that we require it ( as per s259 – 7) , but we do have the original packaging.

I eventually (like a few weeks later) received thisApr 21, 15:50
Hi Nick,
Thanks for your email.
While the unit is no longer covered under warranty we would be happy to process a warranty claim on the camera for you.
Thank you for noting that you do have suitable packaging (that indeed does not need to be the original) in order to transport the unit via post.
From the information you have provided it sounds like there may be an issue with your Canon EOS 650D DSLR.
Please accept our apologies for any inconvenience and we will ensure that this issue is resolved as soon as possible.
So that I may process your claim promptly, can you please provide the following information:
  • Current Address
  • Phone Number
  • Product's Serial Number
Once you have replied with these details, we will arrange for a Pre-Paid Postage Label to be emailed to you via Australia Post.
This label means you will not have to pay postage or handling fees to return the item to us.
Please allow up to 24 hours for this label to be generated and sent to your email address.
Once we receive the item it will be checked into our system and you will be notified via email.
Upon confirmation of a fault, we will be able to progress your claim further.
Please note that if we are unable to diagnose a fault with the unit following the technician's assessment, or we find that the fault is due to accidental or user-related damage, you will be liable for all shipping costs and technician fees involved. We can provide evidence of the unit being fully functional upon request should this occur. If you are returning an item that was damaged on its way to you, this does not apply.
You can find some more detailed information about our warranty process here.
Please let me know if you have any questions throughout this process.
Kindest regards,
Michael W
Kogan

Ok, I thought, this is promising, maybe they are a respectable company that respects Australian law. 

So I responded, addressing a few of my concerns, and emphasising our rights as Australian consumers:

Hello Michael,
Thank you for responding to my preferred email address.I will not
respond to any emails sent to any other addresses and will simply
assume you are ignoring your obligations under consumer law if I do
not receive a timely response sent to this email address.
To address some of your points:- I did not say that I had suitable
packaging for transport. I only said I had the original package (ie
the box). We will, however make do with this, if you only require the
camera itself (ie sans lens and battery).
The information you (don't actually under consumer law) require is
going to be difficult to provide, as the serial number has been worn
on the device. The numbers I can make out are:09.......35
there is another number on the camera, ds126371, There are also some
barcodes on the box, the first one is HC130411654the second is
4960999903477.
Basically though, we have the device and the receipt and the device
doesn't work. I'd just like to point out that if we had been told this
issue would occur after less than two years, we would not have bought
that particular make or model. Which under the Act constitutes a Major
Failure. As defined under s260(a) of the Act, which, also under the
Act (s263(4)), gives us the right to choose between a refund, repair
or replacement, and in this instance we would elect a refund.
If you still would like to go ahead with confirming the fault,
 please send the pre-paid sticker to
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
As you do not need our phone number for anything regarding postage, we
would rather not provide it.
As to your  representation regarding the outcome of finding no fault
(or by somehow trying to place blame upon us, the consumer) following
the aforementioned "confirmation" pertaining to the placement of fees
and charges, I draw your attention to the Act, Chapter 4, Part 4-1,
Section 151(n), whereby if a person makes a false or misleading
representation concerning a requirement to pay a remedy with regard to
the consumer guarantees that cannot be excluded, the person has
committed an offence and is liable for a $220,000 fine. If the person
is a body corporate, the body corporate is liable for a $1,100,00.00
fine. Just so we are clear:- prior to sending the device to your
"technician" for "confirmation", we will be getting a Justice of the
Peace to sign a sworn affidavit as to the state of the device. Any
"evidence" to the contrary would simply be an indication of the
aforementioned offence being committed by you (or whomever decides to
provide such fabricated evidence).
Thank you and we look forward to your timely response.

Kogan's response:

Hi Nick,
Thanks for your email.
We usually find that the original packaging that the device was mailed in constitutes suitable packaging for transport, but please do take care packing the unit as it is your responsibility to ensure the device is packaged reasonably to protect it from being damaged in transport.
I am now going to begin processing your claim using the details you have provided.
While it is not imperative that we have a phone number to contact you on, it does tend to help in some circumstances if we need to contact you, or if there are any complications with the shipping of the item.
I would also just like to confirm the fault you have been experiencing with the camera.
From what I can see from the email correspondence, there appears to be some sort of software issue, as the camera presents with an error message every time you attempt to take a photo, and a factory reset of the camera software has not remedied this issue.
Please confirm this is the case and there are no other apparent issues with the camera.
Please follow the steps outlined in the following emails to have the camera returned.
If you have any questions at all about the process, please simply reply to this email and I can assist you further.
Kindest regards,
Michael W
Kogan

So I asked, 

Once we have received all labels, we will package up the camera (which
has the software error #30 and some kind of fault on the mirror), the
18mm-55mm lens, the battery and charger and ship back to you using the
labels provided in a suitable package. 
How long after shipping will you be able to process our refund as per
your obligations under Schedule 2 of the Competition and Consumer Act
2010? 
SincerelyN

Kogan then informed me of the expected timeframe (ROFLCOPTERS here...)

Hi Nick,
That's no problem at all.
Once we receive the camera we will have to have the unit assessed to verify the fault with the unit.
As per our Warranty Procedure Guidelines, the return procedure for DSLR cameras can take up to 45 days.
We understand this is a rather long time, and in most cases the process will be completed in a much faster time frame, however in cases where specialists are required to complete the assessments, the process may require this extended time frame to complete.
The current average time frame to have an item assessed once received at our service center is less than 21 days, and we are working hard to bring it lower.
I have attached your Australia Post label to this email for your convenience.
If you have any further questions, please let me know.
Kindest regards,
Michael W

45 days. Ok, wow. But you know, Im easy, whatevs, we will live with that, even though its probably on the upper end of what a reasonable person would consider a reasonable timeframe.


He then goes on, 

Hi Nick,
Thanks for providing us with the tracking details.
Unfortunately we cannot provide additional refunds for any costs you opt to spend to return the item to us.
This is why I offered to have packing sent from our service center to pack the unit in, if you felt you could not arrange something suitable yourself.
We will notify you once the item has been received and assessed.
Please feel free to contact us if you require any further assistance.
Kindest regards,
Michael W
Kogan

to which I responded abruptly

Michael,
What you have stated is not accurate according to Schedule 2 of the
Competition and Consumer Act 2010, Section 263 subsection 4(a)(ii);
The supplier must ... :
                     (a)  refund:
                              (i)  any
money paid by the consumer for the goods; AND
                             (ii)  AN
AMOUNT THAT IS EQUAL TO THE VALUE OF ANY OTHER CONSIDERATION PROVIDED
BY THE CONSUMER FOR THE GOODS
You cannot ignore this de jure by simply making a reference to your
offer of supplying something from the service center, as the delivery
of your message was essentially a case of begging the question:-
within the same sentence you proclaimed it would be dealt with in a
more reasonable time frame if I sourced my own (quote: "I can see if
our service center has something suitable to package the camera in for
return, however this will generally take a bit longer to have shipped
out to you than it may be to source your own."). Thus, I sourced my
own in good faith, assuming this would expedite our already
unreasonably lengthy major failure refund claim. I will be raising
this with Fair Trading Queensland should you not come to realise the
facts of de lege lata. As it is stated in the Act, as opposed to what
you propose in your response, should we, the consumer, "opt" to
(reasonably) spend anything in regards to this faulty product, the
cost shall be borne by the supplier.

We then get this:

Hi Nick,
I have received an update regarding the repair of your Canon EOS 650D DSLR.
The technician has thoroughly re-assessed your camera and has provided an update indicating that there was dust and some sort of lubricant inside the lens assembly that has caused the issue.
Unfortunately the presence of foreign materials inside the assembly is not a warrantable fault, and we cannot cover the costs to repair the camera under warranty.
The technician has quoted $264.00 to complete the repair of your camera.
Please let me know if you would like me to prepare an invoice for the camera to be repaired, or otherwise I can have it returned to you in it's current condition.
If there's any further questions regarding this matter that I can assist you with, please let me know and I will promptly address them for you.
Kindest regards,
Michael W
Kogan

Unfortunately for them, the lubricant they seem to have found is obviously the internal lubricant within the lens assembly. Which clearly means it is broken and their technician doesn't know his ass from his d*ck. We have never put anything on the lens other than a microfibre cloth. 
So Kogan, thanks to this saga, I am never buying any of your bullshit ever again, and I'm spreading the word that you are all a pack of snakes. We bought a new camera for my wife from HarveyNorman, who I encourage you all to go to (after you have shopped around so you can price match of course! HarveyNorman expect it, I think). 
Nick.

Wednesday, 1 April 2015

Multiple Linear Regression with Excel (part 1)

Hi Folks

Today I am going to walk through Multiple Linear Regression using Excel. First, a lot is already published and well understood about the regression equations, so I'm not going to go into great detail. If you are interested in the proofs, simply look at the wikipedia article on the subject, which is quite complete.

What are we doing when we do a multiple linear regression? Well the basic idea is you have several "independent" variables that could contribute to the outcome of some dependent variable. For example, the price of a house might be influenced by the number of rooms, number of bathrooms, median house price for the location and current interest rate levels. Assuming the very unlikely case that there is some linear relationship between those variables and the price of a house (a big assumption!), a multiple linear regression could be used to predict what the price of some house will be.

Lets say we have this (totally imaginary) data:
number of rooms number of bathrooms median house price interest rate price of house
6 2 250001.3659 8%  $          850,021.37
4 2 249985.1355 4%  $          650,005.14
2 1 249991.6254 9%  $          450,001.63
3 1 249985.2125 9%  $          549,995.22
4 1 249999.2385 6%  $          650,009.24
5 2 249995.5378 8%  $          750,015.54
3 1 250011.8438 7%  $          550,021.85
2 1 249995.037 4%  $          450,005.04
5 1 249993.0192 6%  $          750,003.02
1 1 250010.0988 1%  $          350,020.10
5 1 249981.2104 4%  $          749,991.21
2 1 250001.5801 5%  $          450,011.58
5 1 250016.6773 7%  $          750,026.68
4 2 249973.7979 6%  $          649,993.80
6 1 250030.3517 7%  $          850,040.36
4 1 249997.3914 4%  $          650,007.39
5 2 250000.8471 10%  $          750,020.86
2 1 249993.2497 8%  $          450,003.26
1 1 250021.2873 6%  $          350,031.29
5 2 250000.1968 10%  $          750,020.21
4 1 249991.4433 6%  $          650,001.45
6 2 249995.1933 4%  $          850,015.19
4 1 249999.3487 4%  $          650,009.35
6 3 250043.1142 5%  $          850,073.12
6 3 250009.1431 7%  $          850,039.15
Now the silly formula I used to generate the "price of house" column is this
=(100000*Number of Rooms + 10*Number of Bathrooms+1*Median House Price+Interest Rate^2)

There is a classic way of attacking this (trying to predict what the price of house column would be for any set of values of X), and it is using matrix algebra.

The basic formula for the "hat" matrix, which is the predicted values for Y, is given as

Yhat = X(X'X)-1X'Y

So in excel, this is really easy. There is a little trick to remember, however, when dealing with this formula in the matrix form, you have to add a column of 1 to the front of both X and Y matrix.
In our case, our X matrix is the columns "Number of Rooms", Number of Bathrooms", "Median House Price" and "Interest Rate" and our Y matrix is simply the "Price of House" (YES you CAN predict more than one dependant variable at a time. More to come in future post)

So the first step is understanding the notation. X' is simply the transpose of the X matrix. The function in excel for this is simply "Transpose"

The -1 indicates that we want the inverse of the matrix of the multiple of (X'X). The inverse of a matrix is simply given in excel by the function "Minverse".

To multiply matrices in excel, you need to use the MMULT function (and remember, in matrix algebra, multiplication isn't necessarily palindromic - the order matters).

So the hat matrix can be calculated by the excel formula
=MMULT(X,MMULT(MINVERSE(MMULT(TRANSPOSE(X),X)),MMULT(TRANSPOSE(X),Y)))

Now if you have followed the instructions and added the column of 1s to both the x matrix and y matrix, you should get the hat matrix (which will have, not surprisingly, a column of 1s prior to the results)

If you haven't worked it out yet, you need to enter all matrix formulas as array formulas. That is you hold down control and shift and then press enter in the formula bar.

If you want to eliminate the column of 1s from the hat matrix, simply transpose, select the column of results and transpose again. ie:
=TRANSPOSE(INDEX(TRANSPOSE(MMULT(X,MMULT(MINVERSE(MMULT(TRANSPOSE(X),X)),MMULT(TRANSPOSE(X),Y)))),2))


For our random data, here are the results of the hat matrix:
number of rooms number of bathrooms median house price interest rate price of house predicted Y (hat matrix)
6 2 250001.3659 8%  $          850,021.37  $                             850,021.35
4 2 249985.1355 4%  $          650,005.14  $                             650,005.12
2 1 249991.6254 9%  $          450,001.63  $                             450,001.61
3 1 249985.2125 9%  $          549,995.22  $                             549,995.20
4 1 249999.2385 6%  $          650,009.24  $                             650,009.22
5 2 249995.5378 8%  $          750,015.54  $                             750,015.52
3 1 250011.8438 7%  $          550,021.85  $                             550,021.83
2 1 249995.037 4%  $          450,005.04  $                             450,005.02
5 1 249993.0192 6%  $          750,003.02  $                             750,003.00
1 1 250010.0988 1%  $          350,020.10  $                             350,020.08
5 1 249981.2104 4%  $          749,991.21  $                             749,991.19
2 1 250001.5801 5%  $          450,011.58  $                             450,011.56
5 1 250016.6773 7%  $          750,026.68  $                             750,026.66
4 2 249973.7979 6%  $          649,993.80  $                             649,993.78
6 1 250030.3517 7%  $          850,040.36  $                             850,040.34
4 1 249997.3914 4%  $          650,007.39  $                             650,007.37
5 2 250000.8471 10%  $          750,020.86  $                             750,020.84
2 1 249993.2497 8%  $          450,003.26  $                             450,003.24
1 1 250021.2873 6%  $          350,031.29  $                             350,031.27
5 2 250000.1968 10%  $          750,020.21  $                             750,020.19
4 1 249991.4433 6%  $          650,001.45  $                             650,001.43
6 2 249995.1933 4%  $          850,015.19  $                             850,015.17
4 1 249999.3487 4%  $          650,009.35  $                             650,009.33
6 3 250043.1142 5%  $          850,073.12  $                             850,073.10
6 3 250009.1431 7%  $          850,039.15  $                             850,039.13

A scatter plot of the hat matrix versus the actual prices shows how well the regression performs:

As you can see from the excel added trendline which calculated an R squared of 1, the fit of the scatter is (very nearly) perfect.

How do we get R squared? It is simply the ratio of the sum of squares of residuals to the sum of squares of the total variation.

That is it is 1-(SSE/SST)
SSE is simply the sum of each residual squared. The residuals matrix is the Y-Yhat. 
So SSE is then, by definition, SUM((Y-Yhat)^2)

SST is simply the sum of the difference of each point in Y from the mean of Y squared and can be calculated easily using the formula

SUM((Average(Y)-Y)^2)

These formulas for the above dataset should produce the following results:
Measure Result
 SSE                                    0.0105388561459062000
 SST       620,048,335,919.4820000000000000000
R squared 1
What this says is that there is a total of 620,048,335,919.482 variance in the Y matrix, and the hat matrix doesn't explain around 0.01 of that matrix. That is, the SSR, or the variance explained by the regression, is SST-SSE = 620048335919.472

This indicates that this particular model explains the data really well, and it could reasonably be expected to predict future results extremely well. 

In the next post of this series, I will go into the analysis of variance and other measures (such as Q-Q plots and residuals interrogation) of regression performance. 

Thanks for reading.

Nick E