473,659 Members | 2,656 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help with Data Comparison: Sample VS. Population

Data Comparison: Sample Versus Rest of Population.

I have a population of data, and I want to take a sample of that
population and compare it against the entire population.

I have a database that records information about the types of Rulings
a person receives.
Each person works for an agency, and there are 12 agencies (see
example below).
Each person receives a ruling, and there are 2 types of rulings,
Guilty or Not Guilty. (see example below).
So, each person receives a ruling and works for an agency.

I want to compare the types of rulings an agency receives with the
types of rulings all the agencies receive.

For example:

Let's say, there were 50 total rulings.
30 = Guilty
20 = Not Guilty

Agency XYZ received 5 total Rulings: 3 Guilty, 2 Not Guilty.

Agency XYZ received:

5/50 = 10% of all of the Rulings
3/30 = 10% of all the Guilty Rulings
2/20 = 10% of all the Not Guilty Rulings

I want to compare the Rulings Agency XYZ received Versus the Rulings
all of the Agencies received, but I'm not sure of: (1) how to
retrieve and perform the proper calculations and (2) how to display
the data.

The only way I know how to do this is to create a report and group by
Type of Ruling (Guilty or Not Guilty) then by Agency, and then I can
perform the calculations, but then the report is really ugly!

Does anybody know of a better way to retrieve the data and then
display it?

For Example: Forgive me, I know this will be hard to read...

Guilty (Grouping Level 1)

Agency XYZ (Grouping Level 2)

# of Guilty Rulings = 3

Agency ABC (Grouping Level 2)

# of Guilty Rulings = 6

Total # of Guilty Rulings for All Agencies = 30 (Grouping Level 1
Footer)

Not Guilty (Grouping Level 1)

Agency XYZ (Grouping Level 2)

# of Not Guilty Rulings = 2

Agency ABC (Grouping Level 2)

# of Not Guilty Rulings = 4

Total # of Not Guilty Rulings for All Agencies = 20 (Grouping Level
1 Footer)

Total # of Rulings: Guilty + Not Guilty = 50 (Report Footer)

SIDE NOTE: I don't think I can first group by Agency then group by
Type of Decision because when you do it this way, you can't tell
whether a Ruling is Guilty or Not Guilty. At least, I haven't been
able to successfully create a report this way. I have to first group
by "type of ruling" instead of by "agency" because I don't know how
to (1) determine the type of ruling (Guilty or Not Guilty) nor (2)
count the number of rulings.
Here are the things I want to be able to do:

(1) I want to be able retrieve the total number of rulings at any
time.

(2) From the total number of Rulings, I want to know the breakdown of
those rulings, how many were guilty and how many were not guilty.

(3) Then I want a breakdown by Agency. How many Total Rulings did each
agency receive and how many were guilty or not guilty. I can do this
by creating a Crosstab Query. But what do I do with that? If my data
is always changing, can I base a report on a crosstab query?

(4) I want to be able to compare the types of rulings an agency
receives (Sample) with all of the rulings received (Total Population).
I'm not sure how to retrieve this information and then display it.
Eventually, I'd like to create a Bar Chart that compares the total
number of rulings an agency receives with the total number of rulings
received.

For example:
50
45
40
35
30 *
25 *
20 * *
15 * *
10 * * *
5 * * * *
0 * * * *
(GUILTY) (NOT GUILTY)
Agency XYZ Total Agency XYZ Total


Here is sample information about my database:

I have a table, Person, that stores information about each person.
I have a table, Case, that records information about a person's case.
I have a table, Decision, that stores the different types of decisions
a person's case can be assigned.
I have a table, Agency, that stores all of the agencies a person can
work for.
Each Agency has a Parent Agency. For example, there may be 15 Agencies
and 3 Parent Agencies.

The Parent Agencies are listed in my Agency table AND have a separate
table just for themselves called ParentAgency.

Here is a simple version of my Agency table:

AgencyID AgencyName ParentAgency
1 Jails - North 20
2 Jails - South 20
3 Jails - East 20
4 Jails - West 20
5 Hospital #1 30
6 Hospital #2 30
7 Babies 40
8 Kids 40
9 Tweens 40
20 Corrections 20
30 Health 30
40 Juvenilles 40
Here is a simple version of my ParentAgency table:

ParentAgencyID AgencyName
20 Corrections
30 Health
40 Juvenilles

Here are the types of Rulings aperson can receive:

RulingID RulingDescripti on
1 Guilty
2 Not Guilty
Nov 13 '05 #1
0 3735

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

46
5125
by: Kingdom | last post by:
In my data base I have a list of componet types e.g. type A - I have 8 off - type B I have 12 off etc. I'm using Set objRS = objDC.Execute("Select DISTINCT Component_Type FROM Parts_Table") to populate a drop down but would like to use several drop downs restricting the contents of each drop down to the records pertaining to one
3
2158
by: aurora | last post by:
This is an entry I just added to ASPN. It is a somewhat novel technique I have employed quite successfully in my code. I repost it here for more explosure and discussions. http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/475158 wy ------------------------------------------------------------------------
20
2673
by: Dj_TRuST | last post by:
This is my homework and i couldn't do it,please help me. I wait your helpsss On the planet Zephod, which orbits the star Betelgeuse, the sharks increase at a rate of 5% of the guppy population per day, provided there are 50 or more guppies per shark. Otherwise, the sharks die off at a rate of 50% per day. The guppies increase at a rate of 80% per day, provided the shark population is less than 20 % of the guppy population. Otherwise...
5
2272
by: jordi | last post by:
I need the random.sample functionality where the population grows up to long int items. Do you know how could I get this same functionality in another way? thanks in advance. Jordi
11
2108
by: Bryan Kyle | last post by:
Hi All, I'm fairly new to C# and Generics and I'm wondering if anyone has some suggestions for me. I'm trying to implement a simple DAO framework using generics to keep my code as clean as I can, however I'm getting an error with what seems to me to be correct code. The error I'm getting is: Error 1 Cannot implicitly convert type 'Sample.PersonDao' to
18
22387
by: robert | last post by:
Is there a ready made function in numpy/scipy to compute the correlation y=mx+o of an X and Y fast: m, m-err, o, o-err, r-coef,r-coef-err ? Or a formula to to compute the 3 error ranges? -robert PS: numpy.corrcoef computes only the bare coeff:
2
2585
by: Richard | last post by:
Help please. I am trying to autofill a form text field from a select-box lookup. I have no problem doing this if the select-box is part of the form but because there are 5 possible select boxes for them to choose from and because of the very large number of options in each select box, to save form loading time, I want to put the look-up select boxes on separate (pop-up) pages. (I prefer them not to be hidden divs on the same page) ...
3
1929
by: TC | last post by:
Hey All, I have some classes that I recently built for a website which uses the HttpWebRequest & HttpWebResponse objects from the System.Net namespace. Basically, the classes rap submitted data up, connect to external websites on external servers and post / remove the data from these other sites. It works fine locally but when uploaded to the BCentral production server, the outgoing requests get shutdown.
0
8427
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8332
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8627
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6179
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4335
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2750
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1975
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1737
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.