You are on page 1of 39

Version 1.

User Manual
JKToolKit - Version 1.2

JKToolKit is a freeware, Excel app housing a suite of calculations of use to mineral


processing practitioners. These range from mature, industry-standard models, to
sophisticated and novel routines that are only described in the academic literature or
specialised reference texts. Calculations that were previously constrained to the domain
of technical specialists have been made more accessible to general industry
practitioners. This Help file contains instructions on the use of the tools featured in the
app, as well as relevant back ground theory where relevant.

JKTech Pty Ltd


40 Isles Road
Indooroopilly
Brisbane
QLD 4068
AUSTRALIA

P: +61 7 3365 5842


E: jk tech@jk tech.com.au
W: www.jk tech.com.au
JKToolKit

© 2024 JKTech

All rights reserved. No parts of this work may be reproduced in any form or by any means - graphic, electronic, or
mechanical, including photocopying, recording, taping, or information storage and retrieval systems - without the
written permission of the publisher.

Products that are referred to in this document may be either trademarks and/or registered trademarks of the
respective owners. The publisher and the author make no claim to these trademarks.

While every precaution has been taken in the preparation of this document, the publisher and the author assume no
responsibility for errors or omissions, or for damages resulting from the use of information contained in this
document or from the use of programs and source code that may accompany it. In no event shall the publisher and
the author be liable for any loss of profit or any other commercial damage caused or alleged to have been caused
directly or indirectly by this document.
4 JKToolKit

1 Introduction
JKToolKit is a freeware, Excel app housing a suite of calculations of use to mineral
processing practitioners. These range from mature, industry-standard models, to
sophisticated and novel routines that are only described in the academic literature or
specialised reference texts. Calculations that were previously constrained to the domain of
technical specialists have been made more accessible to general industry practitioners. This
Help file contains instructions on the use of the tools featured in the app, as well as relevant
background theory where relevant.

2 Installation

If you have a previous version of JKToolKit already installed on your machine, you should first
uninstall this version before commencing with the new installation. To do this, search for
“Add or remove programs” in the Windows start button. You will be taken to a window similar
to the one below, with a list of all the installed programs on your computer. In this window you
will be able to select JKToolKit as the program to be uninstalled. On making your selection
you will be provided with a confirmation dialog as shown below.

Once your older version has been removed, you will now be in a position to begin installation
Installation 5

of the newer version. You will have downloaded the new installer file. You can place this file
anywhere on your computer, since this is not relevant to the installation process.

To start the installation, just double-click the installer file. You will be taken through a
sequence of windows that mark stages of the installation sequence.

When you subsequently open Excel for the first time after completing the install process, you
may need to first load the JKToolKit Add-In into Excel before its features will be made
available to you. Note however, you will only have to do this once. When you next open Excel,
JKToolKit will be automatically loaded and ready for use.

To load JKToolKit, first click on the “File” ribbon at the top left of the Exel interface. At the
bottom of the left side panel, click “Options”. In the new dialogue that appears, click “ Add-Ins”
and you will be taken to the window shown below.

You will see the "Manage" drop-down list at the bottom of this window, which should have
“Excel Add-Ins” as the default selection. Check that this is the case and then press the “Go”
button beside it. Doing this will bring up the Add-Ins check-box list, looking similar to the one
shown on the right below.
6 JKToolKit

In this dialog box you just need to click on the JKToolKitAddin check box, so that a tick
appears in the corresponding check box. Note that Solver must also be installed for some of
the tools in JKToolKit to work properly. Therefore you should also make sure that there is a
Installation 7

tick in the Solver Add-in check box as well.

Once you have a tick in both of these check boxes, press OK and the dialog box will be
dismissed. You should now see JKToolKit as the final tab at the right-hand end of the top
ribbon.

3 How to Use

When you click on the JKToolKit ribbon, the array of buttons available to you will change to
look like the one below:

The labels on each of the large buttons that are now visible represent the categories of tools
available. Each of these buttons is actually a drop-down with a sub-menu of tools contained
within the category concerned. When you select a tool from one of the drop-down lists, a
new sheet will be generated within the active workbook with its name set to the name of the
selected tool (or an abbreviated version of this name).

In all of the calculation aids included in JKToolKit, the convention adopted has been for all of
the input fields to have purple shading.

4 Known Issues
The comparison of grade-recovery curves undertakes over 2,000 Solver routines.
Testing has indicated that this can take anywhere from 5–10 minutes to complete,
depending on machine specs and local processes that may be running in the
background. Users are advised to close other applications while using this tool to
maximise its speed.

If using multiple monitors, all monitors must be set to the same resolution, otherwise
buttons in the graphical user interface (GUI) will not work. These are needed to
execute certain calculations in some of the tools.

As JKToolKit is available for free, it is not supported. Any bugs that are reported to
JKTech will be addressed in future releases.
8 JKToolKit

5 The Tools

The following tools are in the version 1 release of JKToolKit. It is expected that the suite of
tools will grow in future releases.

Comminution
• Morrell power draw model
• Mill charge & speed calculator

Mass balancing
• Error propagation of two-product mass split formula
• Error propagation of two-product recovery formula
• Mass balancing of two-product separation nodes (without weighting)

Sampling and statistics


• Comparison of linear trendlines

• Comparison of grade-recovery curves

General
• Pulp density calculator
• Periodic table

5.1 Comminution Tools

5.1.1 Morrell Mill Gross Motor Input Power Calculator


The following passages were obtained from the SMC Test® website and have been included
in this help file with the permission of SMC Testing Pty Ltd.

See https://www.smctesting.com/ for more info.

5.1.1.1 Description

This model uses the equations from Morrell’s 1993 PhD thesis: “The Prediction of Power
Draw in Wet Tumbling Mills”. The model is also described in detail in the book “Mineral
Comminution Circuits: Their Operation and Optimisation” which is available from the Julius
Kruttschnitt Mineral Research Centre. The model predicts the gross power, which is also
called the motor input power. This is not the same as the so-called “power at pinion”, which is
slightly lower than the gross power and relates to the power as measured at the shaft which
drives the pinion gear in a gear-and-pinion drive. Apart from in pilot-scale mills, the power at
The Tools 9

pinion is never directly measured in full scale operating mills but is estimated from the gross
power by assuming a variety of losses across the motor and gearbox. Published literature
contains a variety of estimates of what these losses are. In pilot-scale mills, where it is
possible to directly measure these losses it is found that proportionately they are relatively
high and can be as much as 20% of the gross power. However, in full scale mills these
losses are proportionately much smaller. A reasonable working estimate to use in the case of
gear-and-pinion drives would be 6-7%, i.e. the estimated power at pinion would be about 6-7%
lower than the gross power draw. Gearless drives (also known as wrap-around motors) are
quite different to gear-and-pinion drives. They do not have gears or pinions and hence the
term “power at pinion” is not relevant to them. With these drives the literature normally refers
to the “power at shell” instead. Once again the literature contains a variety of estimates of
what the losses are in these drives between the motor input and the power at the shell. A
reasonable working estimate to use in the case of gearless drives would be 3-4%, i.e. the
estimated power at shell would be about 3-4% lower than the gross power draw.
The model was originally developed using a data base of 76 operating mills to validate its
accuracy. Since that time (1993) the data base that the model has been tested against has
increased to over 150. AG/SAG mills in the data base are up to 40 ft in diameter and ball mills
are up to 26 ft in diameter. As indicated by this data base the accuracy of the model (1
standard deviation) is 4.6%.

5.1.1.2 Inputs & Outputs

Design Data – this covers mill dimensions, speed of rotation, whether the mill has cone ends
Comminution Tools
10 JKToolKit

and type of
discharge mechanism (grate vs. overflow). The model actually requires the inside liner
diameter, rather than the inside shell diameter often specified by vendors. The required length
to be input depends on whether the mill is an overflow or a grate discharge machine. In all
cases AG and SAG mills are grate discharge and ball mills are mostly overflow (a few,
however, are grate discharge). In overflow mills the belly length inside liners, which is what
the model requires to be input, is very close to the flange-to-flange length. In grate discharge
mills it is the length as measured from the inside face of the grate to the inside face of the
feed end head liner. Note that in much published literature and many equipment suppliers
documentation an “Effective Grinding Length” is often quoted and is often abbreviated to
“EGL”. Beware of what this actually refers to, as its definition varies as there is not a
universally accepted definition. In some cases it will be similar to the belly length inside liner
dimension that the model requires. However, there are cases, usually related to AG/SAG
mills, where the quoted EGL may refer to the flange-to-flange length. If the mill has conical
ends then the angle of the cones needs to be input. If there are no cone-ends then zero
degrees for the cone angle should be input. If you are in doubt the best course of action is to
refer to an engineering drawing of the mill.

Contents Data – the model requires inputs of the liquid and ore specific gravities as well as
% ball filling, % total filling and the % solids by weight of the discharge slurry. The ball filling
relates to the volume (including voids) that the balls occupy when the mill is completely
ground out, i.e. there is no ore in the mill. This volume is expressed as a % of the total mill
volume. Note that these figures should be calculated and input to the model for the cylindrical
part of the mill only, as this simplifies the required calculations by the user. If the mill has cone
ends the model automatically calculates the volume of the cone ends as well as the volume
of balls/rock in the cone ends from the cylindrical section data that the user inputs. In SAG
mills the total filling relates to the combined rock and ball volume (including voids), whilst in
AG mills it relates just to the rocks (including associated voids). The total filling can only be
determined accurately in an operating mill by carrying out what is known as a crash stop. In
this case the mill is effectively tripped when in operation. The feed ore will automatically stop
and any feed water not stopped automatically is also immediately turned off. Measurements
are then taken from within the mill. Accurate measurements of the ball filling can only be
made after the mill is ground out. In this case the mill is operated with the feed turned off until
all of the ore has exited the mill. Measurements of the ball level within the mill can then be
made.

A screen shot of the calculation is shown below. Note that a reasonable estimate of media
SG is 7.8, as shown in the figure. In the case of ball mills, the total filling of cylindrical section
is equal to the ball volume in cylindrical section. A void fill fraction of 1 is a reasonable default
value to use. This refers to the fraction of voids in the total mill charge filled by the slurry.

Comminution Tools
The Tools 11

5.1.1.3 References

Gross Power Calculator, at URL https://www.smctesting.com/documents/


gross_power_calculation_help.pdf (accessed 9 November 2022).

Napier-Munn, T.J., Morrell, S., Morrison, Robert D., Kojovic, T., Mineral comminution circuits:
their operation and optimisation. 1996, Julius Kruttschnitt Mineral Research Centre,
University of Queensland.

5.1.2 Mill Charge and Speed Calculator

5.1.2.1 Description

The purpose of this tool is to determine, for tumbling mills, the mill charge filling as a
percentage of the mill cylindrical section volume, and the speed as a percentage of critical
Comminution Tools
12 JKToolKit

speed for that mill. The critical speed is that at which the mill contents will begin to centrifuge.
Typical mill speeds are in the range of 65-80% critical.

Note that the filling calculation is with respect to a 2D cross-section of the mill (i.e. it is the
filling of the cylindrical section only) which is what is required for the JKSimMet models and
the Morrell gross power draw calculation (detailed in the relevant Help section for the Morrell
model). Some measurement calculations are with respect to the 3D volume of the mill,
which will be different to the output of this tool if the mill has conical ends.

5.1.2.2 Inputs & Outputs

The inside shell mill diameter and average liner thickness can both be measured during a
shutdown, although mill specifications and maintenance records could also be available as a
source of these inputs. The "Charge to Roof Height" input would need to be measured during
a crash stop or grind out, with a laser distance-meter. It is the largest perpendicular distance
from the top of the charge to the mill liners above.

Comminution Tools
The Tools 13

5.1.2.3 References

Napier-Munn, T.J., Morrell, S., Morrison, Robert D., Kojovic, T., Mineral comminution circuits:
their operation and optimisation. 1996, Julius Kruttschnitt Mineral Research Centre,
University of Queensland.

5.2 Mass Balancing

5.2.1 2-Product Mass Flow Error Estimation

Using the two-product formula, you can calculate the mass flows in the product streams of a
separation process, provided there are reasonable differences in the assays of the
concentrate and tailings streams.

The 2-product formula for recovery and mass split respectively are:

and %
Comminution Tools
14 JKToolKit

where R = recovery of species (%), M = overall mass recovery (%) (sometimes called yield,
especially in coal processing), f = feed assay, c = concentrate assay, t = tails assay.

Error propagation calculations are used in the tool to calculate the mass yield variance and
SD. The variance is a function of the mass split sensitivity with respect to changes in the
assays, and the uncertainties in the assay measurements:

Approximately 2 × will correspond to the 95% confidence intervals of the mass yield, due to
errors in the assays alone.

5.2.2 2-Product Recovery Error Estimation


Using the two-product formula, you can calculate the recovery of a valuable mineral into the
product streams of a separation process, provided there are reasonable differences in the
assays of the concentrate and tailings streams.

The 2-product formula for recovery and mass split respectively are:

and %

where R = recovery of species (%), M = overall mass recovery (%) (sometimes called yield,
especially in coal processing), f = feed assay, c = concentrate assay, t = tails assay.

Error propagation calculations are used in the tool to calculate the recovery variance and SD.
The variance is a function of the recovery sensitivity with respect to changes in the assays,
and the uncertainties in the assay measurements:

Approximately 2 × will correspond to the 95% confidence intervals of the recovery, due to
Mass Balancing
The Tools 15

errors in the assays alone.

5.2.3 Simple 2-Product Mass Balance without Weighting


Using experimental assays to calculate mass splits with the two-product formula will often
result in inconsistencies, depending on the element that is used as the basis of the
calculation. This is a result of the usual experimental error. To overcome this problem, this
tool applies minimum adjustments to the experimental assays to produce balanced data
from which a single mass recovery can then be obtained, irrespective of the element that is
used in the two-product formula.

In this tool you enter assays for the feed, concentrate and tailings for a separation node in
your circuit. On pressing the Calculate button, you will be provided with balanced assay
values for this node, recoveries for each of the assayed elements, as well as a value for the
mass recovered into concentrate. An example is shown below.

Note that you do not require estimates of mass flows in the streams for this tool as the two-
product formula only requires assay inputs (though it works better for separation nodes
where there is a large difference in the assays between the feed, concentrate and tailings
streams).

Note also that this tool does not allow for weighting of the assays. All assays are assumed to
have the same accuracy, so all are treated as being equally important in the mass balancing
process. The more elements included in the calculation, the better will be the mass balance
outcome and the greater will be the possibility of identifying any questionable assays.

The chart of measured versus balanced assay values allows you to quickly identify any
problematic assays. If the assays are all good, the points should all be close to the 45 Balancing
Mass degree
16 JKToolKit

line that is plotted for reference on this chart.

5.3 Sampling & Statistics

5.3.1 Comparison of Two Linear Trend Lines


This tool is based on a spreadsheet developed by Prof. Tim Napier-Munn in the mid-1990s
(Napier-Munn, 1998; 2014) with additional features.

5.3.1.1 Overview

This tool fits linear least squares regression models (trendlines) to two x-y datasets and then
provides certain statistical quantities that allow the two lines to be rigorously compared to
determine if they are statistically different, in particular their gradients, intercepts and most
importantly the separation of the two lines projected onto the y-axis. Typical uses include
comparing recovery-feed grade or recovery-con grade correlations for different process
conditions in plant trials (in this case the separation of the lines corresponds to the mean
change in recovery under the new condition), and comparing instrument calibration curves.
However it can be used in many applications. The tool also provides confidence intervals on
the fitted trendlines and their predictions.

When the tool is first opened, it will appear as shown above, with empty data cells and no
Mass Balancing
The Tools 17

graph or results showing. Data and settings are entered on the left. After pressing the
‘Calculate’ button, the two datasets and fitted lines are plotted top centre, and the statistics of
the fit and the various comparisons are shown bottom centre and on the right. The data
column headings are defaults and can be over-written when entering the data.

5.3.1.2 Theory and Interpretation

The method is an extension of the analysis of covariance (ANCOVA). It rigorously compares


two simple linear least squares regression models (trendlines) using tests of hypothesis to
determine whether the gradients, intercepts and the separation of the lines in the Y-direction
are significantly different from each other. In effect it determines whether the Y-values for the
two conditions of the two trendlines are different, having ‘modelled out’ the effect of the X
variable. Napier-Munn (1998, 2014) gives the necessary formulae. The test of the Y-values is
only valid if it has been first shown that the fitted lines are parallel, ie that the two gradients are
not significantly different, as discussed below. This implies that the separation of the lines is
constant over the full range of X-values.
The comparison involves five steps for which all the necessary statistics are provided in the
tool output. In each case a P-value is used to test the significance of the difference in
important values. This has the usual meaning; P is the chance of the computed value of the
particular statistic being zero if the null hypothesis were true, that is, if there were no
difference in the quantities being compared. P therefore measures the risk of being wrong in
your conclusion that there is a significant difference (in whatever quantity is being compared).
100(1-P)% is the confidence with which you can conclude that the difference is real.
Conventionally a P-value of 0.05 or less (i.e. 95% confidence) is used to conclude that the
observed difference is statistically significant. However this value is a professional choice.
Commonly used values are 90, 95 and 99% depending on the context; P-values below 90%
should not be used. See Napier-Munn, 2014, Section 4.2, for a full discussion of the
interpretation of the P-value.
The five steps in the analysis are:
1. Check that the correlation coefficients for the two trendlines are statistically
significant. If one or both are not significant then the method fails because we do
not have two real trendlines to compare.
2. Check that the residual mean squares for the two lines (the scatter around the
lines) are not significantly different. In the same way that a 2-sample t-test requires
samples with variances that are not significantly different, this tool requires the
residual scatter for the two trend lines to be not significantly different. If they are
found to be different (eg P < 0.05), this is not fatal but more significance (smaller P-
values) would then be needed in the following tests.
3. Compare the gradients to see if they are statistically the same, i.e. the trendlines
are parallel. If they are, then the test for the separation of the lines is meaningful. If
not, then this conclusion may be of interest in its own right, but we cannot test the
Sampling & Statistics
18 JKToolKit

separation of the parallel lines in Step 5 below because they are not statistically
parallel.

4. Compare the intercepts to see if they are statistically different. This may have
limited meaning if the intercepts are a long way from the data, as often happens.
5. Compare the separation of the lines in the y-direction to see if it is statistically
significant (greater than zero). This assumes that the trendlines are parallel (as
tested in stage 3 above), with a common gradient equal to a weighted mean of the
individual trend line gradients (calculated by the tool). If the difference is significant,
this implies that the y-values for the two conditions represented by the trendlines are
different, over the range of X encountered in the data, e.g. in a plant trial example,
that the new reagent delivers a statistically significant increase in recovery over the
old reagent, with the interfering effect of feed grade variations on recovery removed
by modelling. To aid interpretation, the tool also provides the confidence interval on
the mean difference in y, and the lower confidence limit. The confidence level is
chosen by the user; the default value is 95%.
The example below shows the use of the method. Two reagents were tested in a
concentrator, one the normal reagent (n) and the other the trial reagent (t). The daily process
recovery was plotted against feed grade for each of the two trial conditions, and two separate
trendlines fitted for the two reagents. The trendline for the new reagent was shown to lie at a
mean recovery 1.5% higher than that for the normal reagent, over the range of feed grades (x-
values) encountered in the trial. This value is shown to be statistically significant (i.e. not
zero). The method requires a statistically significant correlation between x and y in each case,
and also gradients that are not statistically different, such that a separation between the
(statistically parallel) lines is meaningful. These conditions are rigorously tested using various
statistics, as discussed under ‘Outputs’ below.
The tool also includes provision for calculating confidence intervals for the fitted lines, and if
required can be used for that purpose only (ie ignoring the output relating to the comparison of
the lines). Two sets of confidence intervals are provided. The first represents the uncertainty
on the mean, i.e. the fitted line. The second represents the uncertainty in any new prediction
of the model for a given value of X. Both sets of confidence intervals are hyperbolas,
narrowest at the centre where there is most data and diverging at the ends where there is no
data. The prediction intervals are wider than the intervals on the line itself. The confidence
level is chosen by the user; the default value is 95%.

5.3.1.3 Inputs

The main input is two sets of X-Y data, four columns in all, which can be pasted or entered
into the data columns. It is envisaged that this would often be grade-recovery data from a
plant trial, but any X-Y data comprising an independent variable and dependent variable can
be analysed in the same way using this tool. There can be any number of data points, and the
number of data points for the two sets do not need to be the same. But of course for each set
of data, the number of X-values must equal the number of Y-values.
Sampling & Statistics
The Tools 19

Shown below is the data input area; the four columns of input data are at the bottom (and in
this case there are many more rows of data, not shown here).

At the top of the data input area there are two check-boxes. These are to allow you to select
whether or not you want the program to produce two other plots for each dataset – in addition
to the main plot which will always be shown in the centre of the tool's interface area. If you
check either of these boxes, the program will create a new sheet called Regression Lines at
the end of the calculation process. This sheet will contain the plot or plots requested, either
the fitted trendline showing the confidence intervals on the line, or the trendline showing the
confidence intervals on any new prediction of the model, or both. The confidence level in
each case is selected by the user in the dialogue box ‘Confidence level for charts (next tab)’.
The default values are 95%; do not use values less than 90%.
If you want to enter new data, click on ‘Clear Data’. If you modify your data, or your selection
of which plots are to be produced, or the confidence level(s), then run the calculation again.
The Regression Lines sheet that was previously created will be deleted and replaced with a
new one, containing the revised plots.
Note that the confidence interval plots are useful in their own right, and the tool can be used to
generate these plots for any X-Y dataset.
The tool calculates the confidence interval on the measured separation of the two trendlines.
You must choose the confidence level for this calculation and enter it in the first box,
‘Confidence level for separation’. Again the default value is 95%.
Below these fields is a ‘Clear Data’ button that is available for you to clear any existing data
before entering your own data, or to enter new data. Next to this is the ‘Calculate’ button.
Once you have added all the data pairs in the table below for both of your data sets, and
made your other selections, then the ‘Calculate’ button can be pressed to generate the
results. Sampling & Statistics
20 JKToolKit

5.3.1.4 Outputs

PLOTS OF THE DATA AND FITTED TRENDLINES

The main visual assessment of the results is provided by a scatter plot of the data with the
two fitted trendlines also plotted, as shown below. The two datasets are identified as
‘Dataset1’ and ‘Dataset2’. In this case Y is recovery (%) and X is feed grade (g/t). You can
re-format the chart in situ. You can also copy the chart via the ‘Copy Graph’ button provided
in the top right corner, and paste into another Excel worksheet or other application, and re-
format it there. Remember though that if you paste the chart into another Excel sheet or into
MS Word, the copied chart will still be linked to the data in this spreadsheet. If you wish to cut
the link to these data, use the Paste Special command and then select one of the various
graphical options.

The statistical properties of the two trendlines, and the comparison between them, are
summarised in the following output tables:
THE FITTED TRENDLINE STATISTICS

Sampling & Statistics


The Tools 21

This table summarises the parameters of the two fitted trendlines (intercepts and gradients)
and their uncertainties (standard errors). The linear correlation coefficient, R, measures the
dependency of Y upon X, and its P-value measures its significance. As before, a P-value of
0.05 conventionally indicates that R is significant, that is, it is not zero, and therefore there
is a real correlation. R2, the coefficient of determination, measures the proportion of data
variation ‘explained by’ or accounted for by the fitted line (the model). It measures the
goodness of fit of the model. The closer it is to 1, the better is the fit. But note that R2 will
always increase as the number of data points decreases, so there is no ‘magic value’ of R2
which indicates a good fit. R2 is useful to compare similar models. The only rigorous
statistical test for correlation is the P-value for R. In the example above both R-values are
highly significant (P = 0.000 to 3 decimal places) and therefore we do have two real
trendlines to compare. See Napier-Munn (2014) for further discussion of these issues.
COMPARE RESIDUAL MEAN SQUARES (SCATTER)

This table is the statistical test for the comparison of the two residual mean squares (the
scatter around the two lines after the trendlines are fitted) using an F-test. We require that
these values are similar for the two lines, so we are looking for a P > 0.05 for the F-test. In
this case P = 0.31 which meets our requirement, so we can proceed with the rest of the
analysis. Should P < 0.05 we can still proceed with caution but we should prefer lower P-
values for the remainder of the statistical tests.
COMPARE GRADIENTS

Sampling & Statistics


22 JKToolKit

This table is the statistical test for the comparison of the two trendline gradients (slopes)
using an F-test. In order to validate the comparison of the separation of the lines, discussed
below, we require that the lines be statistically parallel, ie that their gradients are not
significantly different, P > 0.05, as in this case. If P < 0.05 then the separation of the lines is
not constant and has no meaning. However the fact that the two lines have different
gradients may still be of metallurgical interest, as it implies that under one condition the effect
of variable X on variable Y is greater than under the other condition.
COMPARE INTERCEPTS

This table is the statistical test for the comparison of the two trendline intercepts using an F-
test. Again a P-value < 0.05 suggests that the lines have different intercepts. Note that this
test can be misleading where the intercepts occur a long way from where the data are.
When comparing the separation of the lines this test is usually bypassed. However
comparing intercepts can sometimes be useful in its own right, for example in comparing
instrument calibration curves.
THE SEPARATION OF THE TRENDLINES
The table below is the statistical test for the significance of the mean separation of the two
trendlines in the y-direction using a t-test, assuming that the two trendline gradients are not
statistically different. P-value 0.05 (or whatever hurdle rate the user chooses) indicates
that the observed separation is statistically significant (i.e. not zero). Confidence intervals on
the separation are also provided, using the confidence level entered in the box in the top left
area of the spreadsheet.

In the example above, using data from a plant trial of a new reagent, the mean separation is
1.5% recovery and this is highly significant with a P-value of 0.023. We are therefore
confident that there has been an improvement in recovery, and our estimate of the quantum
of improvement is 1.5%. The 95% confidence interval on this value (95% chosen by the user
in the data input area as described earlier) is ± 1.4% and the lower 95% confidence limit is
0.3%. Thus we are 95% confident that the improvement in recovery with the new reagent is
Sampling & Statistics
The Tools 23

at least 0.3%, but our best estimate of the improvement is 1.5% ± 1.4% with 95% confidence.
We are 97.7% confident that the difference is not zero (100(1-0.023)%).

Note that this test is invalid if the earlier test of the gradients shows that they are statistically
different. Also if the earlier test of the residual mean squares shows that these are
statistically different then we would want a lower P-value in the test of the separation of the
lines to be confident that the separation is real, for example around 0.01.
BASIC STATISTICS

This table summaries basic statistical information for the two datasets: the means, standard
deviations and number of results.

CONFIDENCE INTERVALS FOR THE FITTED TRENDLINES


If the relevant box in the data input area has been checked, the tool will output a scatter plot in
a new sheet for each dataset, which includes the fitted trendline and the upper and lower
confidence intervals on the line, as shown below. The confidence level for these intervals is
selected in the data input area (the default value is 95%). These confidence intervals should
be interpreted as the uncertainty in the line itself, effectively the uncertainty in the mean at any
point. This plot can be re-formatted and copied as required.

CONFIDENCE INTERVAL FOR PREDICTED Y


If the relevant box in the data input area has been checked, the tool will output Sampling
a scatter plot in
& Statistics
24 JKToolKit

a new sheet for each dataset which includes the fitted trendline and the upper and lower
confidence intervals for any prediction of the trendline model at any chosen value of X, as
shown below. The confidence level for these intervals is selected in the data input area (the
default value is 95%). This plot can be re-formatted and copied as required.

Note that the confidence intervals for the predictions are much wider than those for the mean
(the trendline). This is essentially because the uncertainty in the former is for a single
prediction of the model, whereas that for the latter is for the line as a whole.

5.3.1.5 Summary of Procedure

1. In an Excel spreadsheet with the JKToolKit add-in, invoke JKToolKit > Sampling and
Statistics > Comparison of Trendlines.
2. Enter four columns of data under ‘Data Input’, comprising two pairs of X-Y data. The
two datasets do not have to have the same amount of data. The data can be pasted
from elsewhere, including the column labels, or entered directly. If there is already
data from a previous calculation, press the ‘Clear Data’ button.

3. Choose whether to output either or both of the confidence intervals on the line and on
model predictions by checking the relevant buttons at the top of the tool. Choose the
confidence level for these confidence intervals by entering a value in ‘Confidence level
for charts (next tab)’; the default value is 95%.
4. Choose the confidence level for the confidence limits of the observed separation of the
two trendlines by entering a value in ‘Confidence level for separation’; the default value
is 95%.
5. Press the ‘Calculate’ button. Inspect the output.
6. Copy the graph if desired, by pressing the ‘Copy Graph’ button. The graph can be re-
formatted in situ or when pasted in another document as a Microsoft Excel Chart
Object.

Sampling & Statistics


The Tools 25

7. Interpret the output as described above.

8. If selected, inspect the confidence intervals in the ‘Regression Confidence’ tab. These
graphs can also be copied and re-formatted if desired.

5.3.1.6 References

Napier Munn, T.J., Analysing plant trials by comparing recovery-grade regression lines.
Minerals Engineering, 1998, 11(10), 949-958.
Napier-Munn, T.J., Statistical Methods for Mineral Engineers - How to Design Experiments
and Analyse Data. 2014 (later versions with corrections and improvements), Julius
Kruttschnitt Mineral Research Centre (University of Queensland), 628 pages. Sections 6.3
and 8.3.2.

5.3.2 Bootstrap Comparison of Curves

5.3.2.1 Overview

Grade-recovery curves are used in mineral processing to record the trade-off between the
recovery of the valuable component of an ore and the grade (quality) of the concentrate. They
can be used in principle for any concentration process, but are particularly common in
flotation. Flotation grade-recovery curves are usually constructed from assay data taken from
timed concentrates during a batch flotation test. The curves can also be constructed from
plant data. A typical application would be to compare the effect of two collectors to see which
results in the best grade-recovery relationship. It is important to know whether any observed
improvement is statistically meaningful, and has not just arisen from the usual experimental
error. It is also useful to determine the statistical uncertainties in any calculated value of
importance.
This tool is used to determine whether there is a statistically significant difference between
two grade-recovery curves and to calculate corresponding uncertainties in key outputs. Two
options are available – comparing the curves as a whole, and comparing recoveries at
selected concentrate grades. To allow for varying feed grades, concentrate grade is
expressed as enrichment ratio (ER): concentrate grade/feed grade.
The methods are described in detail in Napier-Munn (2012) and Napier-Munn (2014; Sections
6.6.6 and 6.8.3).
This Help file covers a general description of the tool, the theory behind it, the inputs required,
the procedure to follow to run a calculation, the reported outputs, and their interpretation.

5.3.2.2 Description

Flotation grade-recovery curves are often used to evaluate performance under different
process conditions, such as different reagents or ore types. In such cases it is usual to
Sampling & Statistics
26 JKToolKit

compare one curve against another to determine which curve is operating at a higher (more
efficient) grade-recovery point. Traditionally, this is undertaken visually with little (if any)
consideration of whether any observed difference is statistically meaningful.
This tool allows the statistically rigorous comparison of two grade-recovery curves to
determine if they are really different, in the context of the prevailing experimental error. The
curves are plotted as recovery on the y-axis vs enrichment ratio (ER) on the x-axis.
The tool works best when the data are replicated, that is, each batch flotation test (for
example) is conducted at least twice (preferably three times), and with all the repeat data
entered into the input fields. This allows the true experimental error to be incorporated into the
analysis, upon which the rigour of the method is based.
Two comparisons are available:

A comparison of the two curves as a whole, based on the Extra Sum of Squares
(ESS) principle using a suitable equation (the Bruey function – see ‘Theory’ below) to
fit a smooth curve to each data set.

A comparison of the recoveries predicted by the two fitted curves at a selected value
of ER, using a bootstrap of the Bruey function fitted to the two data sets. This allows
the curves to be interrogated at different values of ER which is useful when the curves
are not parallel; two recoveries at a particular ER can be regarded as the same even if
the curves as a whole are different, and vice versa.

The figure below illustrates these two approaches, for two recovery-ER curves obtained from
laboratory batch flotation tests comparing copper recovery following grinding with two different
grinding media:

Sampling & Statistics


The Tools 27

The Bruey function is fitted to the two original data sets (1 and 2) and the combined data set
(the black curve). The ESS method (further details below) tells us that the two curves are
statistically different overall. However, it is clear that they overlap at low ERs (as many such
curves do) so there is a question as to whether the recoveries predicted by the two curves
are different at different values of ER. In this case, it turns out that at ER = 16 there is no
statistical difference but the difference at ER = 20 is statistically significant; the difference is
3.2% recovery with a 95% confidence interval of ± 2.0%.

An example of the tool interface (at ER = 18) is given below. The data outputs in the figure
form the basis of the discussion in the remainder of this Help file.

Sampling & Statistics


28 JKToolKit

5.3.2.3 Theory

The Bruey function (Bruey, 2010) is fitted to the experimental recovery vs ER data, for both
the methods provided by the tool. The function is a re-parameterisation of the Vera function
(Vera et al, 2000) which is specifically designed to fit a grade-recovery curve, in which grade
is expressed as enrichment ratio, ER (concentrate grade/feed grade). The Bruey function
has some advantages including that the parameters have some physical meaning, and
experience has shown that the parameter standard errors (uncertainties) are generally lower
than those of the Vera function.
The Bruey function is:

where Rmax = notional maximum recovery (%).

c = a parameter describing the linearity of the fitted curve.


ER50 = notional ER at a recovery of 50%.
Sampling & Statistics
The Tools 29

The tool uses the Excel Solver routine to fit this non-linear function to the experimental
recovery-ER data, using non-linear least squares regression. In regression, the ‘sum of
squares’ (SSQ) is the sum of the squared differences (residuals, or ‘errors’) between the
experimental y-values (recovery, in a grade-recovery regression) and the y-values predicted
by the fitted model. Fitting a model to the data involves finding the model parameters which
minimise the SSQ, the so-called ‘least squares’ method. Non-linear regression requires
preliminary estimates (starting values) for the three parameters.
Comparison of curves as a whole – the Extra Sum of Squares method (ESS)

The ESS method tests the null hypothesis that the two curves are not significantly different
overall. It compares the total SSQ from fitting the chosen model to the two data sets
separately, to the extra SSQ obtained by combining all the data from the two data sets and
fitting a single curve. If the increase in SSQ when fitting a single curve is statistically
significant, then we can conclude that we are better off with two separate curves, ie there is a
significant difference between the two grade-recovery curves, and the higher one reflects a
real improvement in performance. If there is no significant increase in SSQ when fitting the
single curve, then we conclude that there is no benefit in fitting two separate curves and so
the two data sets must be statistically similar (not significantly different).
The comparison is made using an F-test of mean squares (MS = SSQ/degrees of freedom,
which is equal to the number of data points minus the number of parameters fitted, three in
this case). The F-test leads to a P-value which is the chance of getting the calculated value
of F if the null hypothesis was true. Conventionally a P-value of 0.05 or less allows the null
hypothesis to be rejected, and the alternative hypothesis, that the curves are indeed different,
to be accepted. An alternative interpretation is that we can be 100(1-P)% confident (eg 95%
or more) that the curves are different.
Comparison of predicted recoveries at a chosen value of ER
It is easy enough to calculate the predicted difference in recovery between the two data sets
at a chosen value of ER, using the fitted Bruey function for the two curves. However this
gives no information about the uncertainty and significance of the calculated difference. This
is done in the tool by ‘bootstrapping’ the two fitted curves to generate a large number (1,000 in
this case) of fits of the two curves and the corresponding values of recovery at the chosen
ER value. The corresponding 1,000 differences between the two sets of predictions are then
interrogated to calculate confidence intervals and limits for the mean difference.
Bootstrapping involves taking the predicted recoveries from the two fitted curves, and adding
to them a normally distributed random number with zero mean and standard deviation equal
to the standard error of the original fit. The Bruey function is then fitted to the original ER
values and the corresponding new recovery values, for both curves, and the recovery at the
chosen ER calculated from each of the new fits. The difference in these predicted recoveries
is then calculated. This procedure is repeated 1,000 times for each data set, giving 1,000
predicted differences in recoveries at the chosen ER, and an overall mean difference. The
significance of this mean (testing the null hypothesis that it is zero) is determined by a z-test
in which z = mean/standard deviation, and the significance of z is determinedSampling
by reference to
& Statistics
30 JKToolKit

the normal distribution to generate a P-value, 0.026 in this case. Selected confidence
intervals and limits at a chosen confidence level are calculated using the percentiles of the
1,000 simulated differences. These confidence intervals and limits correctly reflect the
uncertainty in the fits to the original data, which will in turn reflect true experimental error if the
data were replicated.
These processes are illustrated in the next two figures which are histograms of the 1,000
simulated differences for the present example, for a chosen ER value of 18:

The differences are normally distributed with a mean of 2.03%. The red line in the above
figure is drawn at difference = 0%, and the proportion, P, of the data to the left (ie negative
differences) is effectively a test for the null hypothesis that the difference is zero. P = 0.026
which is less than the conventional hurdle rate of 0.05, so we can reject the null hypothesis
that the difference is zero and accept the alternative hypothesis that there has been an
increase in recovery in the second grade-recovery curve, at an ER value of 18. This is
equivalent to concluding that we are 100(1-P) = 97.4% confident that there has been an
improvement (a positive difference).

Sampling & Statistics


The Tools 31

The figure above shows the 95% confidence interval of ± 1.95% on the mean difference of
2.03%, containing 95% of the simulated differences, with 2.5% lying above and below that
interval.

5.3.2.4 Inputs

First, ensure that the Excel Solver add-in is present. Go to File > Options > Add-Ins >
Manage Excel Add-Ins > Go > Click Solver Add-In > OK.
Go to JKToolKit > Sampling and Statistics > Comparison of Grade-Recovery Curves. This
will return the template spreadsheet shown previously (with mostly empty fields).
The cells requiring input from the user are shown in purple:

Sampling & Statistics


32 JKToolKit

Proceed as follows:
1. Enter or paste the data, a pair of ER-recovery data sets. Flotation data sets will often
have the same number of data points because the same concentrate timings will have
been used, but this is not mandatory. The default headings can be over-written.

2. Enter the data set names. The default names ‘Baseline’ and ‘Trial’ reflect the common
application of comparing two ER-recovery curves under current and trial conditions. They
can be overwritten.

3. Enter the starting values of the Bruey function parameters Rmax, c and ER50. The
default values will often be satisfactory. However, it is important that these values be as
close to the final fitted parameters as possible otherwise the Solver routine may not
converge correctly. If necessary first plot the data and estimate Rmax and ER50 by visual
extrapolation. c measures the linearity of the data; straight lines have c 5 and lines with
strong curvature have c 15. If the first run shows a poor fit then try different starting
values. One strategy is to run the calculation with the default values, and then if the fit is
poor, use the new parameter values as the starting values for the next run.

4. Check the ‘Include Bootstrap Calculations’ box if you wish to determine the difference in
recoveries at a chosen value of ER, and its significance and uncertainties. If you only
wish to determine whether the two fitted curves are different overall, do not check this box.
This is because the Extra Sum of Squares calculation for the overall difference is
relatively fast, whereas the bootstrap can take several minutes on a typical laptop. The
ESS calculation will always be performed if the Bootstrap box has been ticked.
Sampling & Statistics
The Tools 33

5. If the Bootstrap box has been ticked, enter the ER value at which you wish the recovery
comparison to be made.

6. If the Bootstrap box has been ticked, enter the confidence level at which you wish the
confidence intervals and limits of the recovery difference to be calculated. The default
value is the commonly used 95% level.

7. If the Bootstrap box has been ticked, enter the lower and upper bin values for the
histogram of the simulated differences to be plotted. The default values (-5 and +5) will
often be appropriate. If not, they can be modified based on inspection of the histogram,
even after a bootstrap has been completed.

8. Once all the data has been entered, press ‘Calculate’. If the bootstrap box is unchecked
the calculation will take a few seconds. If it is ticked, the calculation may take several
minutes. A progress update will show at the bottom of the screen, in increments of 5%.

9. After a run, changes can be made to selected inputs and ‘Calculate’ pressed again to
perform another calculation. Press ‘Clear Data’ if you want to clear all inputs apart from
default values. Default values can be overwritten if required. Runs with identical inputs
will give slightly different bootstrap values each time because of the random numbers
used to simulate the 1,000 different data sets to be fitted for each curve.
5.3.2.5 Output, and its Interpretation

The figure below shows the outputs of the tool. Each part will be dealt with in turn.

Sampling & Statistics


34 JKToolKit

Parameter Fits
These are shown for each data set in the first two boxes under ‘Fitted Results’. They include
the three parameters themselves, the sum of squares for the fit, and the standard error of the
fit, which is calculated as (SSQ/n-3) where n is the number of data points and 3 is the
number of parameters of the function being fitted. The SSQ is used in the Extra Sum of
Squares calculation (see below). Note that Rmax is allowed to exceed 100%, as the purpose
is to get the best fit of the Bruey function to the data over the range of the data, which is often
far removed from ER = 1 (ie at Rmax).
Bootstrap Results

These are shown in the third box under ‘Fitted Results’. They show the mean difference in
recovery at the chosen ER and identify which curve is higher (ie ‘better’) by the name given to
it in the input. The 1-sided and 2-sided P-values are given for the null hypothesis that there is
no difference in recovery at that ER. Finally there are a number of confidence intervals and
limits which help in assessing the uncertainty in the estimate of recovery difference.
Scatter Plots
The graphs in the output show the original data of the two data sets as symbols, together with
the fitted Bruey function curves. It should be inspected to ensure that the fitted curves pass
satisfactorily through the points for each data set. If not, then the tool should be re-run with
alternative starting values of the parameters. Rmax and ER50 can be visually extrapolated
from the plots and the starting values modified accordingly if the fits are not satisfactory. The
c parameter should be chosen to reflect the linearity of the points – low for linear points and
high for points with strong curvature.
Sampling & Statistics
The Tools 35

The plot can be formatted, copied and pasted like any Excel graph.

Histogram
The histogram shows the distribution of the 1,000 simulated differences in recovery at the ER
selected in the input (18 in this example). The histogram will almost always show the
characteristic bell-shape of the normal distribution; if not, an investigation is warranted.
The histogram is not essential to a rigorous analysis but it is helpful in visually understanding
the significance and uncertainty of the estimate of mean difference, which will be reflected in
the calculated confidence intervals. Look for the zero bin on the x-axis (or the nearest one to
zero). The further away it is from the histogram peak, the more significant is the mean
difference.
The histogram can be formatted, copied and pasted like any Excel graph.
Extra Sum of Squares Calculations
This is found in the bottom right hand portion of the output. The full calculations are included,
though only the P-value is pertinent to the interpretation. N is the number of data points for
each fit, in this example 12 for each data set and 24 for the combined data (global fit). ‘DF’ is
the degrees of freedom for each SSQ, equal to N-p where p is the number of parameters
being fitted, 3 in the case of the Bruey function. ‘Fit 1+2’ is the sum of Ns, DFs and SSQs for
the two separate curve fits. ‘Difference’ is the difference in SSQ and DF between the global
fit and the two separate curves. The mean squares (MS) are SSQ/df and have the units of
variance.
The statistic F is the ratio of the Difference MS to the Fit 1+2 MS which measures the
increase in mean square going from fitting two curves to one. The bigger this increase, the
more likely we are to reject the null hypothesis that the two curves are the same and accept
the alternative hypothesis that they are different. The P-value for F measures the chance of
being wrong in rejecting the null hypothesis, so a low P-value implies confidence that the two
curves are really different. As before, the conventional hurdle rate is P 0.05. 100(1-P)%
can be interpreted as the confidence with which we can conclude that the difference is real.

5.3.2.6 How to Interpret the Output

Step through the following items in sequence to fully interpret the tool output. This includes
both the Extra Sum of Squares and the Bootstrap methods.
The Parameter Fits
1. The recovery at a given ER for either Data Set can be predicted by applying the Bruey
equation using the fitted parameter values.

2. ± 2 x standard error is the approximate 95% confidence interval on any one recovery
prediction of the model at a given ER value. Thus for Data Set 1 the 95% CI on recovery
prediction is approximately ± 4%, and for Data Set 2 approximately ± 3%.
Sampling & Statistics
36 JKToolKit

The Extra Sum of Squares method


3. The key output of the ESS method is the P-value. As noted above, conventionally P
0.05 is taken to be evidence that the two recovery-ER curves are different, and thus that
the ‘higher’ curve reflects improved flotation performance. 100(1-P)% can be interpreted
as the confidence with which we can conclude that the difference is real. In this case P =
0.0001 and so we can be >99.9% confident that the two curves are truly different overall.
This says nothing about whether the predicted recoveries are different at particular values
of ER. This can only be determined using the bootstrap.

The Bootstrap
4. The ‘Mean Difference’, in this case 2.03%, is the predicted difference in recoveries at the
chosen value of ER, in this case 18. The ‘Largest Mean Dataset’ identifies which of the
two data sets has the superior Recovery-ER curve, in this case the ‘Trial’ data. Note that
the Mean Difference shown is that predicted by the bootstrap and will be slightly different
to that predicted by substituting in the two fitted equations, because of the random nature
of the bootstrap.

5. The P-values determine the significance of the predicted recovery difference. The 1-sided
P is used if the Trial curve is expected to lie above the Baseline curve, ie we expect an
improvement in the Trial curve. The 2-sided P is used if we have no expectation as to
which curve will be superior. In this case we expect an improvement, and so P = 0.026
which by convention (P 0.05) allows us to conclude that the observed increase in
recovery at ER = 18 of 2% is real (not zero). Note that P = 0.000 implies P < 0.001, ie
highly significant.

6. The various confidence intervals and limits quantify the uncertainty in the recovery
difference of 2.03%. The confidence level used is that defined in Step 6 of the Inputs, in
this case 95%.
- The 2-sided CI of ± 1.95% allows us to state that the predicted increase in recovery with
the Trial condition is 2.03 ± 1.95%, with 95% confidence.
- The 1-sided lower limit of 0.36% allows us to state that the increase is at least 0.36%,
with 95% confidence.
- The 1-sided upper limit of 3.75% allows us to state that the increase is not greater than
3.75%, with 95% confidence.
Note that the calculation of these confidence intervals and limits are approximate because
of the random nature of the bootstrap.
7. The histogram confirms the general conclusions of the bootstrap, in terms of the
significance of the difference in recoveries, and its uncertainties.

Sampling & Statistics


The Tools 37

Final Conclusion
The scatter plot and fitted curves confirm the superior performance of the Trial tests. The
difference in the curves is statistically significant overall and thus the conditions of the Trial
data delivers an improved performance over those of the Baseline data.
The magnitude of the improved recovery at ER = 18 is 2.03% ± 1.95%, with 95% confidence,
and this improvement is statistically significant with 100(1-0.026) = 97.4% confidence. We
are 95% confident that the improvement is at least 0.36%.
Note: The principles of hypothesis testing, P-values, confidence intervals and the like are
discussed in Napier-Munn (2014), Chapter 3 and 4.

5.3.2.7 References

Bruey F, 2010. Private communication (Cytec Inc.)


Napier-Munn TJ, 2012. Statistical methods to compare batch flotation grade-recovery curves
and rate constants. Minerals Eng., 34, 70-77.
Napier-Munn TJ, 2014. Statistical methods for mineral engineers – how to design
experiments and analyse data. JKMRC, University of Queensland, 646pp.
Vera MA, Franzidis JP, Manlapig EV, 2000. The locus of flotation performance. Proc. XXI Int.
Miner. Proc. Cong., Rome, July. Elsevier Sci., 74-82.

5.4 General

5.4.1 Pulp Density

This tool provides a means of calculating various values associated with the density
characteristics of a slurry.

5.4.1.1 Description

This tool undertakes pulp density calculations – users have a choice (controlled by the drop-
down menu) of inputting three variables which allows the tool to calculate the remaining two.
User-inputs are purple cells, while calculated outputs are grey cells.

An example is shown below for a user input liquid density = 1, solids density = 2.7, and %
solids by weight = 35%.

The calculated pulp density = 1.28 relative density (RD), or 16.63% solids by volume.

Sampling & Statistics


38 JKToolKit

The formulae underlying the calculations are given below.

Symbols

Liquid density = l (default 1.0 RD)

Solids density = s

Pulp density = p

Weight % solids concentration = CW

Volume % solids concentration = CV

In all calculations where CV and CW are inputs, first convert CV and CW to proportions by

General
The Tools 39

dividing by 100.

Given s and p, calculate CV and CW.

Given CW and s, calculate p and CV.

Given CV and s, calculate p and CW.

Given CW and p, calculate s and CV.

Given CV and p, calculate s and CW.

Given CV and CW, calculate s and p.

General

You might also like