Discussion: View Thread

Applied Stat - Help, I need a flat floor!

  • 1.  Applied Stat - Help, I need a flat floor!

    Posted 07-09-2014 14:07
    Okay, so my concrete floor is not level - there are high spots and there are low spots. My goal is to achieve <1/8th inch difference between any two spots within any 10 foot radius. What I have is elevation measurements across the entire floor, at every 6 inches along the Y and the X axis. 

    Initially, I created a program to find any difference between any two spots that is greater than 1/8th of an inch and less than or equal to 10 ft apart. But then I realized if I were to shave down the high spot, I may create another difference between some other two spots. 

    How can find the optimal solution? In other words, how can I figure out which spots to shave down or which gaps to fill in such that I can achieve the desired flatness with the minimal amount of work?

    -------------------------------------------
    James Joseph
    INC Research
    -------------------------------------------


  • 2.  RE: Applied Stat - Help, I need a flat floor!

    Posted 07-09-2014 14:33
    Unless I misunderstand, the optimal solution is to find the mean height and then shave/fill to that level.  Other than that, fill to the maximum height or shave to the minimum height.

    -------------------------------------------
    Robert Gallavan
    Principal Statistician
    I3/Statprobe
    -------------------------------------------




  • 3.  RE: Applied Stat - Help, I need a flat floor!

    Posted 07-09-2014 14:44
    I think the mean height will give me a perfectly flat AND level floor. Instead, I just need the desired flatness (<1/8th inch difference) for every 10 feet. Should I use a two-dimensional moving average instead? 

    -------------------------------------------
    James Joseph
    INC Research
    -------------------------------------------




  • 4.  RE: Applied Stat - Help, I need a flat floor!

    Posted 07-09-2014 14:59
    I would calculate a distance matrix between all possible pairs of measurements (height and distance) and use a clustering algorithm to create clusters of contiguous points spaces that meet my threshold values.  This should create a series of outliers that can be shaved or filled, as needed, with possibly multiple clusters developing if the outliers form a barrier. 

    The kicker might be if you have a discontinuity, i.e., one ridge where the floor jumps an extreme amount, at which point you'd have two clear clusters where the outliers within the clusters can be fixed by my approach, but achieving the overall goals will be impossible without a graded fill.

    How much variance in height do you have?

    -------------------------------------------
    David Mangen
    -------------------------------------------




  • 5.  RE: Applied Stat - Help, I need a flat floor!

    Posted 07-09-2014 15:15
    That was my initial solution until I became concerned about the kicker you mentioned - I know spots on the floor that vary as much as half an inch! The hardwood I lay across the floor will not be able to bridge that gap. This usually occurs between the slabs of the concrete that lie vertically along the Y-axis.

    I imagine that a two-dimensional moving average would reveal the minimal set of errors I would need to correct for, i.e. when the error is >1/8th inch, shave points that lie above the average , fill points that lie below. I think this will avoid issues of discontinuity. What do you think? 

    -------------------------------------------
    James Joseph
    INC Research
    -------------------------------------------




  • 6.  RE: Applied Stat - Help, I need a flat floor!

    Posted 07-09-2014 15:33
    This feels like a problem that already has a solution. Since you've asked the consulting section, I'll propose that good consulting practice usually calls for finding out what kinds of solutions are currently used and acceptable in the field before trying to invent something new. What do flooring professionals do? Perhaps diy.stackexchange.com would be helpful?  Does the answer even have to involve statistics? What about a bag or two of self-leveling concrete? 

    -------------------------------------------
    Aaron Rendahl
    University of Minnesota
    -------------------------------------------





  • 7.  RE: Applied Stat - Help, I need a flat floor!

    Posted 07-09-2014 16:13
    I've talked to countless flooring "professionals" but they are not interested in saving time nor material. In fact, they'd prefer to do what they know best - whether that be pouring self-leveling concrete (can't, will further diminish ceiling height), or grinding the entire floor down (unnecessary and costly) - as long as their paid per hour. 

    I realize that only a statistician can determine the optimal solution. I am defining optimal solution as one that addresses the least number of 'nooks'  and 'crannies' to achieve the specified flatness. 

    If the problem already has a solution, I believe it lies in geospatial moving averages. Please correct me if I'm wrong, but consider this: I attach a string onto the wall, say 1-inches above the floor, and pull it taut across the room, attaching it to the other end of the room, also 1 inch above the floor. I continue as such so that I create a coordinate grid the covers the floor in question.

    At each coordinate, I measure the difference in height between the floor and the string. I subtract 1-inch from each observation to get Z for each (x,y), say Zx,y. 

    I then derive a function to realize the 10-foot-radii-moving average of Z at each coordinate, say (MAx,y) . Whenever | Zx,y -  MAx,y | > 1/16th inch, I'll grind positive differences down to elevation=MAx,y and fill negative differences up to the (MAx,y). The final results gives me a floor where there is an average difference in elevation of near 0 for every possible 10 ft interval.


    -------------------------------------------
    James Joseph
    INC Research
    -------------------------------------------




  • 8.  RE: Applied Stat - Help, I need a flat floor!

    Posted 07-09-2014 18:07
     "I am defining optimal solution as one that addresses the least number of 'nooks'  and 'crannies' to achieve the specified flatness."

    There are two classes of such solutions: flooding with leveling cement (which treats the entire floor as a single depression) and grinding the entire floor down (which treats the entire floor as a single prominence).  These are not unique: one can add additional leveling cement as desired.  One can continue to grind (at least until holes appear in the substrate).

    Even if you choose to count depressions and prominences differently, the objective function will still be discontinuous and no "nice" solution can be found in general when the problem is framed that way.

    It has become apparent this is a real floor and not a metaphor disguising a sensitive or proprietary investigation, so let's talk about floors.  If you express the costs in terms of $x per unit volume of prominence to grind down plus $y per unit volume of depression to fill--which is a pretty realistic and practical assessment of the situation--then the cost as a function of the final elevation is easy to express as an integral and it has a unique optimum whenever x and y are strictly positive.  The integral, being a global function of the floor-qua-surface, is not possible to evaluate using purely local methods and therefore it will in general not be a good idea to search for an optimum using local techniques such as window-based smoothers (moving averages or whatever), although you could get lucky.

    The calculation of the integral is very easy to perform once you have interpolated among the point elevation readings (which opens a huge can of worms that I will not address here).  Generally, though, the optimum will not be terribly sensitive to the interpolation method because presumably you have chosen a spatial sampling density that captures all the principal variations in the elevations.  For the calculation, then, just use a GIS or any other platform that has stock algorithms to interpolate and integrate raster data.  (You can even buy "cut and fill" software for CAD and GIS platforms: this is used to optimize cutting and filling for road construction projects, for instance.)

    It is possible you might find that the cost to achieve a reasonably level floor is prohibitive, especially in cases where the floor has a slight pitch overall: that would require grinding out half of it and filling in the other half.  It could pay to generalize the problem and find an optimal solution where the final floor is still flat but might not be perfectly level or perhaps where it is neither but at least has very little curvature at any point in any direction.  (This is what I settled for in a 100 year old second floor bathroom.)  You will need to specify how to trade off flatness and levelness.  A practical person would just use trial and error.  A foresighted practical person with a computer would use trial and error with the data to simulate the process and the result before ever putting hand to belt sander.

    -------------------------------------------
    William Huber
    Quantitative Decisions
    -------------------------------------------



    If the problem already has a solution, I believe it lies in geospatial moving averages. Please correct me if I'm wrong, but consider this: I attach a string onto the wall, say 1-inches above the floor, and pull it taut across the room, attaching it to the other end of the room, also 1 inch above the floor. I continue as such so that I create a coordinate grid the covers the floor in question.

    At each coordinate, I measure the difference in height between the floor and the string. I subtract 1-inch from each observation to get Z for each (x,y), say Zx,y. 

    I then derive a function to realize the 10-foot-radii-moving average of Z at each coordinate, say (MAx,y) . Whenever | Zx,y -  MAx,y | > 1/16th inch, I'll grind positive differences down to elevation=MAx,y and fill negative differences up to the (MAx,y). The final results gives me a floor where there is an average difference in elevation of near 0 for every possible 10 ft interval.


    -------------------------------------------
    James Joseph
    INC Research
    -------------------------------------------



  • 9.  RE: Applied Stat - Help, I need a flat floor!

    Posted 07-09-2014 18:39
    I cannot thank you enough for your responses - they all helped me better understand the challenge at hand and hone in on the most viable solution. 

    I've found an R-package that can apply window-based smoothers to three-dimensional data. I will set it to my desired tolerance and realize the error I need to account for via grinding/filling. Thank you, Akash Sheth from DrexelU, for bringing to my attention.

    Alternatively, I could run with some of the iterative methods mentioned here, virtually of course, and sum the total amount of grinding/filling at each coordinate to reveal the work that needs to be done there.

    You are all invited to the house warming.

    -------------------------------------------
    James Joseph
    INC Research
    -------------------------------------------




  • 10.  RE: Applied Stat - Help, I need a flat floor!

    Posted 07-10-2014 14:00
    I invite you to compare those smoothers to the appended R solution that implements the optimization ideas I have tried to express previously.

    This solution finds a final floor (a planar surface) that minimizes the sum of three costs.  I chose to find a planar surface because it constitutes a simple easily-assessed target to achieve in the field.  This seems a far more practicable approach than attempting to achieve any curved or locally smoothed solution would be.  Without extensive and painstaking additional measurements as the work progresses, it would be almost impossible to determine when a nonplanar solution has actually been attained.  It's far easier to aim for a planar floor initially because deviations from planarity are easily detected and corrected.  If one has a LIDAR scanner available to monitor the work, then this solution could be modified to include, say, quadratic or cubic spline terms to allow for some undulation--but that seems like overkill.

    The three costs are

    1. a cost of leveling any parts of the initial surface down to the floor, which is directly proportional (to first order, anyway) to the amount of material removed.

    2. a cost of filling any parts of the initial surface up to the final floor, again directly proportional to the amount of material added; and

    3. an optional "global" cost associated with the departure of the floor from being perfectly level.  This cost in my implementation is proportional (again to first order) to the square of the dip angle.

    They can be measured in time, materials, labor, quality of the final result, or anything else relevant, but of course they must be made commensurable.

    Each cost can be controlled by specifying a multiplicative constant.  The first two ("local") costs can further be adjusted to allow one to stop short of removing all the required material (or filling all the required material) by a prespecified amount, the "threshold" parameter of function U().

    It is amusing to rerun the solution by varying the relative amounts of the three costs as well as the"threshold" parameter.  This can dramatically change which parts of the floor are removed, which parts are filled, and how level the final floor is.  This shows--as proof of concept--that it can be important to pay attention to the relative costs of the different kinds of remedial operations available (cutting and filling).  Any solution that does not quantify these cost components could be a good one only by accident.  (Even my solution might not be ideal if there are additional costs it does not capture, but that does not change the point that costs must be considered.)

    I have included initial code to simulate floor data, enabling quick evaluation of many scenarios if actual data are not available.  The executable code needed to perform the optimization comprises only a dozen lines: the rest is function wrappings and display of the results.  That should make it fairly easy to modify and maintain.

    This approach, incidentally, includes as special cases L1 fits, L2 fits, quantile regression, and Deming regression, thereby exhibiting some of the alternative recommendations as special (but limited) examples of this approach (such as basing the optimization on medians).  It does not require regularly spaced data--but for irregular data it should be modified by including a weights vector, one weight per elevation measurement, giving the floor area represented by each measurement.  These weights should be applied multiplicatively to the local cost terms.

    (In the interests of time the code is quick and dirty, containing no validity or error checks, little post-processing of the solution, and only primitive out-of-the-box visualizations of what is going on.  Because it is intended as a (working) illustration, it uses only base packages installed with R.  It is complete enough to show that this approach works well and to demonstrate its flexibility and adaptability to individual needs.)

    -------------------------------------------
    William Huber
    Quantitative Decisions
    -------------------------------------------

    #
    # Generate a nubbly slightly tilted floor covering [0,x.max] X [0,y.max].
    # The (x,y,z) measurements will be stored in a dataframe xy.df.
    #
    dip <- 0.01              # Radians
    strike <- 0.5            # Radians, positive relative to (1,0)
    sd.floor <- 0.005        # Meters: waviness of floor
    se.measurement <- 0.001  # Meters: iid measurement error
    x.max <- 5               # Meters along
    y.max <- 3               # Meters across
    n.x <- 23                # Number of regularly spaced x measurements
    n.y <- 16                # Number of regularly spaced y measurements
    set.seed(17)

    # The (x,y) grid.
    d.x <- x.max / n.x; d.y <- y.max / n.y
    x.start <- runif(1, 0, d.x); y.start <- runif(1, 0, d.y)
    x <- seq(x.start, by=d.x, length.out=n.x)
    y <- seq(y.start, by=d.y, length.out=n.y)
    xy.df <- expand.grid(X=x, Y=y)

    # The wavy component.
    z <- matrix(rnorm(n.x*n.y), nrow=n.x, ncol=n.y)
    k <- outer(x, y, function(j,i,s=0.05) { # s is the spatial scale of the "waves"
      v <- pmin(j/x.max, 1-j/x.max)
      u <- pmin(i/y.max, 1-i/y.max)
      z2 <- 1/2 * (u^2 + v^2) / s^2
      ifelse(z2 > 100, 0, exp(-z2))
    })
    k <- k/sum(k)
    wave <- Re(fft(fft(z) * fft(k), inverse=TRUE))
    wave <- wave / sd(wave) * sd.floor

    # Add the trend and the measurement error.
    plane <- outer(x, y, function(x, y) -(cos(strike)*x + sin(strike)*y)) * tan(dip)
    z <- plane + wave + rnorm(n.x * n.y, 0, se.measurement)
    z <- z - mean(z)         # Original mean elevation is zero as reference.
    xy.df$Z <- as.vector(z)
    #------------------------------------------------------------------------------#
    #
    # Fit an optimal plane.
    #
    # The local penalty is cost[1] times the amount above the threshold
    # or cost[2] times the amount below the threshold.
    #
    U <- function(delta, threshold=0.0, cost=c(1,1)) {
      delta.minus <- delta + threshold; delta.plus <- delta - threshold
      (delta.plus > 0) * delta.plus * cost[1] - (delta.minus < 0) * delta.minus * cost[2]
    }
    #
    # The global penalty tries to level the floor as well as flatten it.
    # Its argument is the coefficient vector (b1, b2, b3, b4) designating the
    # plane b1*x + b2*y + b3*z + b4 = 0 (equivalently, z = (b4 - b1*x - b2*y)/b3).
    #
    V <- function(coeff, strength=100*n.x*n.y) {
      nu <- sqrt(sum(coeff[1:3]^2))
      strength * sum((coeff[1:2]/nu)^2)
    }
    #
    # The objective is the sum of the local penalties at the residuals
    # plus any global penalty for lack of levelness.  The
    # residuals are *distances* from the data points to the fitted plane.
    #
    objective <- function(coeff, data=xy.df, penalty.local=U,
                          penalty.global=function(beta){0}, ...) {
      # (Optional args are passed to the local penalty function.)
     
      coords <- as.matrix(subset(data, select=c("X", "Y", "Z")))
      nu <- sqrt(sum(coeff[1:3]^2))
      sum(penalty.local((coords %*% coeff[1:3] - coeff[4]) / nu, ...)) +
        penalty.global(coeff)
    }
    #
    # Use the OLS solution to construct a starting estimate.
    #
    fit.lm <- lm(Z ~ X + Y, data=xy.df)
    beta <- coef(fit.lm)
    coeff.start <- c(-beta["X"], -beta["Y"], Z=1, beta[1])
    #
    # Polish it with a nonlinear optimization.
    # The local costs can be controlled here through the `threshold` and `cost`
    # arguments.  The global cost is controlled via the `penalty.global`
    # argument, which is the global cost function (exemplified by V()).  To remove
    # the global penalty, use `penalty.global=function(b){0}`.
    #
    fit <- optim(coeff.start, objective, penalty.global=V, threshold=0.0025, cost=c(3,1))
    #
    # Compute the fitted values.
    #
    b.hat <- fit$par
    xy.df$Pred <- with(xy.df, (b.hat[4] - b.hat[1]*X - b.hat[2]*Y) / b.hat[3])
    #
    # Display the results.
    #
    par(mfrow=c(2,2))
    plot(xy.df$Z, xy.df$Pred, col="#00000040",
         xlab="Current elevation", ylab="Final elevation")
    abline(c(0,1), col="Red", lwd=2)
    image(z, asp=y.max/x.max, main="Current elevation")
    image(matrix(xy.df$Pred, nrow=n.x), asp=y.max/x.max, main="Final elevation")
    image(matrix(xy.df$Z - xy.df$Pred, nrow=n.x), asp=y.max/x.max,
          main="Residuals")
    #
    # Quick contour plots show the magnitudes and signs of the results.
    #
    par(mfrow=c(2,2))
    plot(xy.df$Z, xy.df$Pred, col="#00000040",
         xlab="Current elevation", ylab="Final elevation")
    abline(c(0,1), col="Red", lwd=2)
    contour(x, y, z, asp=y.max/x.max, main="Current elevation")
    contour(x, y, matrix(xy.df$Pred, nrow=n.x), asp=y.max/x.max, main="Final elevation")
    contour(x, y, matrix(xy.df$Z - xy.df$Pred, nrow=n.x), asp=y.max/x.max,
          main="Residuals")





  • 11.  RE: Applied Stat - Help, I need a flat floor!

    Posted 07-10-2014 14:24
    This has been a pretty interesting discussion. This is a demonstration of theory vs practical methods dichotomy.

    Practicalities: "decorative concrete overlays can handle Gulf Coast conditions. However, the minimum thickness of the overlay should be ¼ inch." 1/4 inch means that you cannot taper to 0. This exceeds the requirement of 1/8 inch max difference.

    The cost of adding material is probably 1/10th the cost of removing materials by sanding. Sanding must be done carefully, using environmental protection. 

    In most places, a habitable room has a minimum height of 7.5 ft or so. 

    Thus, we can come up with a whole bunch of fancy approaches, but the most practical one that is going to PASS CITY INSPECTION (you have a building permit, right??) is probably going to be self-leveling concrete layer of 1/2-1 inch. This will automatically level.

    -------------------------------------------
    Paul Thompson
    Director, Methodology and Data Analysis Center
    Sanford Research/USD
    -------------------------------------------




  • 12.  RE: Applied Stat - Help, I need a flat floor!

    Posted 07-10-2014 15:13
    Love it, Paul...nice boiling it down.

    We finished building our house about 2 years ago and you SAID it re: inspections.

    So, added to the methodology: be nice to the building inspector.

    -------------------------------------------
    Jason T. Machan
    Director, Lifespan Biostatistics Core,
    Lifespan Hospital System
    Research Scientist, Biostatistics, Research
    Rhode Island Hospital
    Associate Professor, Departments of Orthopaedics and Surgery
    The Warren Alpert Medical School, Brown University
    Director Biostatistics Externship, Adjunct Assistant Professor, Department of Psychology
    University of Rhode Island
    -------------------------------------------




  • 13.  RE: Applied Stat - Help, I need a flat floor!

    Posted 07-10-2014 15:18
    Here is a question about theory vs practice:

    You have a board of exactly 1 ft length. You will cut it in half using a table saw with a furniture blade. Exactly how long will each piece be if they are cut exactly in half?

    -------------------------------------------
    Paul Thompson
    Director, Methodology and Data Analysis Center
    Sanford Research/USD
    -------------------------------------------




  • 14.  RE: Applied Stat - Help, I need a flat floor!

    Posted 07-10-2014 15:49
    I suspect each half will be slightly shorter than 1 ft - blade width, because of saw vibration.

    If I can add to the floor problem.  Self levelling compound claims on the package that it will adhere down to 1/8 inch thickness.  However I have never found it to self level to that thickness.

    -------------------------------------------
    David Patin
    Cook, Inc.
    -------------------------------------------




  • 15.  RE: Applied Stat - Help, I need a flat floor!

    Posted 07-10-2014 15:54
    I am only a scratch carpenter, so I cannot tell you off the top of my head saw kerf for such a blade, but it is between 1/16" and 3/32", Assuming 1/16 for simplicity, the final length would be 6" - 1/32 or 5 31/32" inches.

    I'm not surprised to hear about it not adhering to 1/8". That is a very thin plate. Plus if it does adhere, it will be very brittle.

    -------------------------------------------
    Paul Thompson
    Director, Methodology and Data Analysis Center
    Sanford Research/USD
    -------------------------------------------




  • 16.  RE: Applied Stat - Help, I need a flat floor!

    Posted 07-09-2014 17:25
    Yeah, this is a solved problem. One issue with applying small amounts of concrete is that there are issues with the retention of the patch. There are often minimum thicknesses for patches - 1/2 inch or so. Thinner, it does not stay in place. Your best bet may be skim coat applied by a professional.

    -------------------------------------------
    Paul Thompson
    Director, Methodology and Data Analysis Center
    Sanford Research/USD
    -------------------------------------------




  • 17.  RE: Applied Stat - Help, I need a flat floor!

    Posted 07-09-2014 17:38
    If the statistical problem is in fact solved, please direct me to a formulaic solution that I can apply to my observations.

    In the case of a 3D histogram, there are algorithms that can be applied to smooth the surface. Perhaps I can apply such algorithm to my (X,Y,Z) observations to give me Z* values denoting the elevation required in order to achieve a tolerance of <1/8th inch for every 10ft.  Then, I can take Z - Z* to reveal what areas I need to fill and which to grind down. 




    -------------------------------------------
    James Joseph
    INC Research
    -------------------------------------------




  • 18.  RE: Applied Stat - Help, I need a flat floor!

    Posted 07-09-2014 17:54
    Maybe I'm missing something, but I don't see this as a statistical problem, as posed. The optimality criteria originally stated are (1) <1/8th inch difference between any two spots within any 10 foot radius and (2) minimal amount of work. The solution is to fill in all holes; it achieves a difference of approximately 0 between any two locations with a minimal amount of work.



    -------------------------------------------
    David Bristol
    Statistical Consulting Services
    -------------------------------------------




  • 19.  RE: Applied Stat - Help, I need a flat floor!

    Posted 07-09-2014 18:42
    Original Message:
    Sent: 07-09-2014 17:53
    From: David Bristol
    Subject: Applied Stat - Help, I need a flat floor!

    "Maybe I'm missing something, but I don't see this as a statistical problem, as posed. The optimality criteria originally stated are (1) <1/8th inch difference between any two spots within any 10 foot radius and (2) minimal amount of work. The solution is to fill in all holes; it achieves a difference of approximately 0 between any two locations with a minimal amount of work."

    I partly agree in the sense that the problem on balance is primarily one of optimization rather than applying some routine statistical procedure, but with reservations:

    1. There potentially are statistical issues pertaining to the measurement of the elevations and the prediction of elevations at unmeasured points.

    2. The problem "as posed" is rarely the problem that needs to be solved.

    3. A clear and unique definition of "hole" is quite difficult to come by!  You can have depressions within depressions within depressions.

    4. The stated solution is rarely optimal. For instance, if grinding the floor is easier (or more reliable, or more permanent, or cheaper...) than filling it, then the optimal solution will involve very little filling at all. The implicit assumption is that leveling depressions is very little work compared to other actions that could be taken.

    To me, the interesting aspect of this question concerns the mix of statistical, quantitative, modeling, and practical considerations that go into framing the problem in a constructive manner that permits an acceptable solution, and finding the hidden assumptions that are being made both by the proposer and parties who recommend solutions.  That is a very statistical enterprise.

    -------------------------------------------
    William Huber
    Quantitative Decisions
    -------------------------------------------


  • 20.  RE: Applied Stat - Help, I need a flat floor!

    Posted 07-09-2014 14:59
    I think you are going to have to define the loss function for this process.  The immediate alternative, within a given 10 foot radius is to find the maximum and fill anything more than 1/8th inch lower than that.  But is that more work/cost/time than shaving and filling to some intermediate height between max and minimum?  Once that is defined for a 10 foot radius, how do you intend to proceed?  Shift the center slightly and repeat?  Move to the adjacent radius with no overlap?

    -------------------------------------------
    Robert Gallavan
    Principal Statistician
    I3/Statprobe
    -------------------------------------------




  • 21.  RE: Applied Stat - Help, I need a flat floor!

    Posted 07-09-2014 15:53

    I had a similar problem.  Grinding high spots is not easy.  The equipment is heavy and easy to grind too much.  While liquid floor levelers are too viscous for small differences close together.  I used a liquid leveler to fill the really low spots/large differences and then put plywood sheets down which averaged out the remaining small differences.


    -------------------------------------------
    David Patin
    Cook, Inc.
    -------------------------------------------




  • 22.  RE: Applied Stat - Help, I need a flat floor!

    Posted 07-10-2014 07:30
    Won't filling and shaving to the mean height only be optimal if the distribution of the heights is normal, or at least symmetrical?    If he has an unsymmetrical pattern then this might work but not necessarily be the solution with the least cement or shaving needed.

    -------------------------------------------
    Bill Bentley
    Value-Train
    -------------------------------------------




  • 23.  RE: Applied Stat - Help, I need a flat floor!

    Posted 07-11-2014 14:30
    For those who obviously haven't had the pleasure of laying ceramic title over a cement floor, the easiest way to level the floor is to purchase a Floor Leveling Compound at Lowes or Home Depot and follow the instructions.  It comes either premixed or you can mix it yourself.  The latter requires a large bucket and perhaps a mixing attachment for a rather large drill.  Just pour it on, it flows to the low spots, smooth out the top and wait until it dries.  No computer software involved.  The only calculation necessary is the quantity needed.  Many stores will take returns on unopened containers, so the calculation of amount need only be approximate.  

    -------------------------------------------
    Douglas Splitstone
    Principal
    Splitstone & Associates
    -------------------------------------------




  • 24.  RE: Applied Stat - Help, I need a flat floor!

    Posted 07-10-2014 10:12
    Going back to the mathematical/statistical problem rather than any of the practical aspects of this problem, given that you want to minimize the number of nooks and crannies to fill, the median is a better statistic to use than the mean. If you don't care about how high a high point is or how low a low point is, then you should identify "problem" points using the median not the mean.

    -------------------------------------------
    Eric Vance
    LISA (Virginia Tech's Laboratory for Interdisciplinary Statistical Analysis)
    Director and Assistant Research Professor
    Blacksburg VA, United States
    -------------------------------------------




  • 25.  RE: Applied Stat - Help, I need a flat floor!

    Posted 07-10-2014 12:22
    I wonder if there's a more brute-force method.

    You have an estimate of the entire floor. While it may be somewhat coarse, it's what you have.

    It sounds like there are at least 2 kinds of effort:
    1) grinding
    2) filling
     (and everything that goes with each)

    One approach may be to:
    1) assign costs per volume associated with each (in whatever units are relevant to you...perhaps just a simple weighting)
    2) Sequence (loop) from "filling everything to level and flat" through "grind everything to level and flat" in some reasonable number of steps
    a) interpolate in some way between points and estimate the volumes that would need to be ground/filled
    b) Assign cost for each (cost per volume x volume)
    c) sum the costs of each
    d) find the combination of filling and grinding that had the minimum total effort

    Once programmed, it would allow you to play around with some of the assumptions and see how robust the combination is to things like:
    1) interpolation method
    2) Maybe you need to pitch the floor towards a drain. Does varying the angle subtly impact the combination of grinding/filling.

    ...or did I just completely miss the point of your post. That happens sometimes. :-D  If so, please let me know so we can all have a laugh over it!

    J

    -------------------------------------------
    Jason T. Machan
    Director, Lifespan Biostatistics Core,
    Lifespan Hospital System
    Research Scientist, Biostatistics, Research
    Rhode Island Hospital
    Associate Professor, Departments of Orthopaedics and Surgery
    The Warren Alpert Medical School, Brown University
    Director Biostatistics Externship, Adjunct Assistant Professor, Department of Psychology
    University of Rhode Island
    -------------------------------------------




  • 26.  RE: Applied Stat - Help, I need a flat floor!

    Posted 07-09-2014 15:14
    The optimal solution will balance the costs associated with cutting and filling (which might be different from each other and might be measured per unit area, per unit volume, or in some other way).  It will also take into account the losses associated with failure to achieve perfect levelness. Those costs and losses might very well be position-dependent (perhaps edges of the floor are of less concern) and they likely depend on roughness: a very gradual, smooth deviation from levelness might be more acceptable then lots of tiny spikes all over the place.  There might also be a penalty for complexity: the physical process of filling in gaps or grinding down high spots might be easier to carry out over large connected portions of the floor compared to many tiny pieces.

    If you're not entirely convinced that all these issues are important, consider a situation in which grinding down a floor is difficult, time-consuming, and expensive, but floor material is cheap.  There the optimal solution is likely to be to pour a whole new floor over the old. This also shows why the elevation of the floor after optimal treatment is not necessarily any kind of average of the original elevations.

    (Some of these issues become more or less plausible and of greater or lesser importance if this "floor" is seen as a metaphor for an analogous problem, such as grading a building site, preparing an electronic substrate, or grinding a mirror.)

    It is therefore crucial to begin by framing the question in a way that correctly and quantitatively conveys all relevant objectives, constraints, costs, and losses.  At that point we can discuss solution methods (and that's where the information about the elevation dataset will be needed).

    -------------------------------------------
    William Huber
    Quantitative Decisions
    -------------------------------------------

    -------------------------------------------
    Original Message:
    Sent: 07-09-2014 14:07
    From: James Joseph

    Okay, so my concrete floor is not level - there are high spots and there are low spots. My goal is to achieve <1/8th inch difference between any two spots within any 10 foot radius. What I have is elevation measurements across the entire floor, at every 6 inches along the Y and the X axis. 
    <snip>
    How can find the optimal solution? In other words, how can I figure out which spots to shave down or which gaps to fill in such that I can achieve the desired flatness with the minimal amount of work?




  • 27.  RE: Applied Stat - Help, I need a flat floor!

    Posted 07-09-2014 15:40
    I'd start by identifying the two points with the largest absolute difference in height and adjust them both equal to their mutual average (doesn't have to equal the global average, just change this one difference to zero with the least possible amount of effort; it will probably make some other differences smaller incidentally). Then recalculate the differences and iterate until the largest remaining absolute difference is within the bound.

    -------------------------------------------
    Wayne Cornelius
    Data Mgmt & Statistical Services Unit Supervisor
    Ambient Monitoring Section
    -------------------------------------------




  • 28.  RE: Applied Stat - Help, I need a flat floor!

    Posted 07-09-2014 18:29
    Why can't you sand down the highest spot first and then recalculate all the heights? Repeat until you get the desired smoothness. I may be wrong, but I think you can't introduce more problems with height disparities if you always start with the highest remaining peak. It may not be optimal, but I suspect it would be close to optimal and it sure seems easier than some of the proposed alternatives.

    -------------------------------------------
    Stephen Simon
    Independent Statistical Consultant
    P. Mean Consulting
    -------------------------------------------




  • 29.  RE: Applied Stat - Help, I need a flat floor!

    Posted 07-09-2014 19:05
    Hi in case it is helfpul one more reply. My brother is a retired engineer and at one time worked on the space shuttle and a few other high tech military aviation projects. His suggestion 
    is as follows and he urges you get a helper
    --------------------------------------------------------------------------
    .Easier solution.  Go to a place which repairs tilted or non-level floors.  There is a special concrete which can be poured over the top of the existing floor and it is liquid enough to be self leveling.  I think if your friend does a lot of home projects he can do it.  But he will need a helper and it's messy.  Home Depot sells the material.  The floor should be clean before it is repaired.
     
    Get more bags of the fast curing material than you need, mix with water and pour it on the floor.  A leveling trowel or "screed" might be needed to move the stuff around quickly while it self levels.  
     
    Measure the square footage.  Then your friend can take the average elevation of the floor.  Find the low spot with a level (on a tripod) with a "range rod" or measuring rod.  Two man job.  Mark the high spot as zero.  Then at suitable intervals, put the measuring rod on the floor and measure the distance below the high spot and write a number like -.25 or -1.00 at suitable intervals around the floor.  
     
    For simplicity, lets say the high spot is zero and the rest of the floor averages about 1/2 below the high spot,  being sure to find the low spot(s).  If it looks like the average is about -0.5 inches, then the volume to be filled is .5in x (length in decimal feet x 12in/foot) x (width in decimal feet x 12 in/foot).  Result will be in cubic inches.  1728 cubic inches per cubic foot so just do the arithmetic and it will give you the cubic inches which you can convert to cubic feet.  The store should be able to swag how many bags you need but get about 15% more than you need.  Better to take back a bag or two than to run short on the job.
     
    How big is the guy's basement?  Be sure to protect things sitting on the floor like water heaters and furnaces; don't plug floor drains or plumbing openings, all the obvious stuff.  If the floor was poured poorly then the quick filling material will work.  I cannot imagine the floor wasn't leveled when it was first laid.  Good workers know what to do and I would hire a guy.  A mistake is hard to fix and to explain to the better half.
     
    If the floor has heaved, then talk to an engineer because if it is moving up and down, the owner will have a problem 

    -------------------------------------------
    Chris Barker, Ph.D.
    Consultant and
    Adjunct Associate Professor of Biostatistics
    www,barkerstats.com

    ---
    "In composition you have all the time you want to decide what to say in 15 seconds, in improvisation you have 15 seconds."
    -Steve Lacy
    -------------------------------------------




  • 30.  RE: Applied Stat - Help, I need a flat floor!

    Posted 07-10-2014 07:37
    Since you didn't define your definition of 'work', I suggest taking bids from contractors, accept the lowest bid that you trust, let them do it without concerning yourself with how they do it, and watch the remaining FIFA world cup games with a beer and snacks.  That sounds like 'least work' to me.  :-)

    -------------------------------------------
    Bill Bentley
    Value-Train
    -------------------------------------------