1. Increasing Reporting
Value with Statistics
Safe Harbor
I've always said to anyone that will listen to me
(which is not very many) that software is an art
form. It attracts artists.
Just look at any software company and the
amount of musicians, artists, carpenters, etc…
working there that create code for a living and
create other things in their down time.
- Steve Lacey
1
2. Statistics is the study of the collection,
organization, analysis, and interpretation
of data. It deals with all aspects of this,
including the planning of data collection
in terms of the design of surveys and
experiments.
- From wikipedia, the free encyclopedia
Why is this important
e
4 out s cal
o
d e n ti f 5 On a 10…
sts… to
o f1
Lead
Data Scorin
g
quality
indicator
2
3. salesforce
• Lead Scoring
• Contact Scoring
• Data Quality Indicators
• Deal sizes
• Wait times
• Call volume
• New customers
• …….
Statistics 101
• Analysis of information
– Sum
– Average available in
– Minimum salesforce
– Maximum
• Distribution
– Normal
– Skewed
– Standard Deviation
3
5. HELP!!!
Lead Scoring
• e-mail – 10 points
• Company size, industry – 10 points
• Location – 10, 20 or 30 points
• Phone – 30 points
• Lead source – 5–15 points
• Other information – 5-15 points
• Job title – 15 points
• What is a good score?
5
6. Analysis of lead scores
• 1000 leads per week
• Who are my top 10%?
• Data quality – bottom 20%
• How do I know who to follow-up with?
I have an Idea !
6
7. 1000 leads…
• 700 leads about average
• 125 leads above average
• 25-30 leads top tier
How do we do this in salesforce?
• Lead Object
– Add a scoring process / field
– Add ranking
– Create a queue
• Campaign
– Add lead count / average
– Add standard deviation - NEW
– Triggers to update campaign (or lead)
statistics
7
8. Standard Deviation
• Measurement of difference between
the average and each observation
• There are some limitations
• Not natively calculated by salesforce
Let’s make this easy
• Deviation = the “difference between observation
and average” = lead score – campaign average
• Sum of expected squared deviation
• Take the average
8
9. APEX Code
leadData = [Select id, TV_points__c from Lead where campaign__c =:cmpang.Id];
for (Lead l:leadData) {
lCount ++;
lValue += l.TV_points__c;
}
if (lCount > 1) {
lAverage = lValue / lCount;
for (Lead l:leadData) {
lVariance = (l.TV_points__c - lAverage);
lVarTot += lVariance * lVariance;
}
lVarAvg = lVarTot / (lCount - 1);
*
*
*
Approximate the square root
lVarAvg
9