1

I am useless at maths and have been trying to figure this out for ages. I am creating an website for a client which prices fabric based on square inch of material. Their supplier gave them the attached table but I cannot work out the base price per square inch to use as a multiplier. Is there a formula that can work this out?

I have been calculating the base square in price by dividing the price by square in but it changes as the size goes up? When finished the customer should be able to enter width and height and get a price?

price calc

Sorry if this seem pretty obvious but its wrecking my head

Thanks in advance

Joe

dantopa
  • 10,342
  • Welcome to Mathematics Stack Exchange! A quick tour will enhance your experience. Here are helpful tips to write a good question and write a good answer. For equations, please use [MathJax](https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial- – dantopa Jun 18 '19 at 15:39
  • 1
    Welcome to stackexchange. I think what you are asking for is a formula for calculating the entries in the table given the width and the drop. There may not be such a formula - you could begin to find out if you entered the data in a spreadsheet and examined it. Perhaps regression would work. But I suspect that your best bet is just to program the table lookup. – Ethan Bolker Jun 18 '19 at 15:41
  • Thanks folks, I have asked the supplier for the base calculation however they seem to cling to it like its an important secret. They have also locked the spreadsheet so I cant see the formulae – Joseph Hunter Jun 18 '19 at 15:52
  • 1
    The problem is that if you do manage to work out the formula and then the supplier changes it a bit, you have all the work to do over again, and meanwhile, the website is wrong. Better to use a lookup table, as Ethan said, not least because it's easy to update. – saulspatz Jun 18 '19 at 15:59

2 Answers2

1

All the values left of 60 width and up from 42 drop fit roughly $18.77+0.94({\text{width+drop}\over6}-8)$ and beyond that I'm not much help. But as everyone says, All they need to do is change it and you're no longer able to find it easily without lookup.

0

As said in comments, a table lookup is probably the best since you will recover the exact price (this will not be the case using regression since the model could be not perfect).

Anyway, what I would suggest is to plot the values in each row and column and try to see if the prices are linear or quadratric. Suppose that the price is quadratic in both directions. This means that the model could be $$P=(a_0+a_1 W+a_2 W^2) +(b_0+b_1 W+b_2 W^2)S +(c_0+c_1 W+c_2 W^2)S^2$$ that is to say that you face a simple multilinear regression with $8$ predictors which are $$W,S,WS,WS^2,W^2,W^2S,W^2S^2,S^2$$ This would be simple to do using matrices. For sure, afterwords, you will need to check the standard deviations to possibly exclude some factors.