Component: Msp430GpioC
generic module Msp430GpioC()
Implementation of the general-purpose I/O abstraction
for the TI MSP430 microcontroller.
- Author:
-
Joe Polastre
- See:
-
Please refer to TEP 117 for more information about this component and its
intended use.
Provides
Uses


Local families of fallen police officers leave for annual Heroes Cruise
by Bob WardAt Logan Airport Terminal E, families of fallen police officers united, not by grief this time, but by the possibility of healing. They are taking part in a free Heroes Cruise of Germany courtesy of Vantage Deluxe World Travel.
"We are a police family my goal is to never let Jerry's memory go," said Cynthia Hurley.
Related Headlines
Hurley's husband was Boston Police officer Jeremiah Hurley, who was killed in the line of duty in 1991.
Cynthia is going on the trip to help others.
"I don't think you can ever put it aside, we are here and hopefully we are going to have a good time," said Hurley.
Falmouth Police officer Ryan Moore was shot on the job in July 2018.
"I was shot. But fortunately, I made it out unlike a lot of other officers," said Moore.
He's retired now but his road to recovery is long.
"After the incident, you think everybody is evil and you forget there are still good people out there," said Moore.
This group will spend a week together cruising Germany's Rhine River but it is the process of recovery that really binds them.
"It's a family and it is something special that we have something in common. And that our loved ones paid the sacrifice. They are all heroes," said Doris Beauregard Shecrallah.
In a little over a week, these families will return to Boston. It's hoped this experience will strengthen bonds and help these heroes heal.


Quick Replace Bookmarklet
What is it?
Quickly replace text or images in a webpage locally to see how it looks without knowing any HTML or having to upload files to a server.
Installation
Drag this link to your bookmarks or click it to try it out
Quick Replace
Usage
- Click the bookmark to enable “edit mode”
- Roll over any element to see some useful info about the text or image it contains
- Click any text to edit it
- Drag an image from your local machine and drop it on top of an image in the browser to replace it
- Click the “X” in the upper-right of the viewport or the bookmark again to exit “edit mode”
Known issues
- Dragging an image into the browser to replace an image will only work in browsers that support the File and FileReader API, like Chrome & Firefox
- Dragging an image into the browser to replace an image will only work with images displayed as an
img
element - not as a CSS background-image
or a canvas
element
- Replaced images will be shown at the same dimensions as specified by the original image (via
img
attributes or CSS styles)
- Chrome will prevent the script, which is insecure (served over HTTP), from being loaded into a secure page (served via HTTPS)


{% include head.html %}
I recently graduated from the University of Southern California with a Bachelors of Science in Mechanical Engineering. I am currently seeking a position in test engineering and quality assurance.
USC Rocket Propulsion Laboratory is a group dedicated to becoming the first undergraduate team to send a rocket into space. While most of the team was concerned with the rocket going up, I was in charge of making sure it came down safely and within the state, the second part being accomplished by a dual deployment system. This included:
The Pixtronix team at Qualcomm was working on a MEMS display. I was on the failure analysis end, working to identify the problems and increase overall yield in manufacturing. This included:
I got to work on researching the passive attenuation of shock waves using smart obstacle arrangements, in which I utilized shock focusing techniques to mitigate the effects of shock waves. To do this, I
If you had any meaningful roles at college, feel free to write about them here.
Donut Locator is an open source node/ember app that lets users find donuts within a defined radius from their home.
DEUG is a local monthly meetup in Springfield where we share all the latest tips and tricks for dat donut lifestyle. I organize the group, and typically eat most of the donuts.
Solidworks and Solid Edge
Excel, LaTeX, MATLAB, Labview
Bread winning, conflict resolution, couch inspection, TV longevity testing
Awarded for stopping a nuclear meltdown, even though I also started it.
Honored by Duff Beer for being an outstanding customer several years straight. Qualifications included most beer consumed at a bar, most beer purchased, and most beer ralphed.
Specifically this prestigious awarded twice for stopping a robber with my belly.
Organized fund drives and participated in fundraising events for the benefit of families in third world countries without proper access to malt beverages.
Founding member of the local nuclear workers labor union.


About RASM
What is RASM?
Really Awesome Space Missions are really awesome interactive simulations of space missions. RASM is similar to Star Trek or Star Wars, except instead of Captain Kirk or Han Solo, it's you in the pilot seat. Simulations include a lot of really awesome things - intense music and sound effects, science-fiction-style command stations, and complex simulation software.
How is RASM different than other "space centers"?
RASM differs from other space simulation centers in several key areas:
- RASM uses much more sophisticated software than other space centers.
- Really awesome missions require really awesome software. RASM software is built from the ground up to be really awesome - from things like advanced physical simulation to physically accurate ship armour.
- RASM is semi-automatic, which means that simulations run smoother and seem more real.
- RASM uses technologies and concepts that are based in reality.
- Warp drive and transporters are mostly imaginative. RASM chooses to use technologies like ion boosters, nuclear generators, and shuttles, which are scientifically accurate.
- Learning about technologies that already exist (at least in a prototype form) is more educational and beneficial than learning about conceptual technologies.
- RASM is portable and cost-effective.
- RASM is based around a portable canopy system that can be set up anywhere with power available. RASM can come to you!
- RASM is much less expensive than other space centers. We believe in making it easier for everyone to experience Really Awesome Space Missions.
- RASM supports the community.
- RASM can sponsor school or community clubs or teams, with a lowered price and part of the proceeds going directly to the club or team.
- A part of the proceeds from every RASM mission goes to CODE.org, an organization dedicated to helping students to learn computer science.
What does a project like RASM require?
Really awesome space missions require both really awesome advanced hardware and really awesome software. Here are some examples of what RASM needs to provide you with the best experience possible.
- Advanced sound systems
- High quality, professional graphics
- Intense music in a lot of styles
- Complex programming, and a lot of it (more than 10,000 lines of careful code)
- Low profile, discrete GPUs
- LCDs
- High quality data processors
- Comfortable seating and tables
- Power cables and extension cords
- Canopy for housing
- Large projector


This is a site for discovering what open source work developers are doing in the Greater St. Louis region by harvesting public information from Github.
If a user on Github has self-identified as being from St. Louis, they are included here. You may also log in to this site and request to be included if you are from St. Louis or identify as a St. Louisan.
There are over 1,000 developers from St. Louis on Github that have pushed to over 4,000 code repositories.
The creator of the sublime-text git plugin is from St. Louis. Another St. Louisan created a JavaScript CMS and yet another made a Dropbox-like sync tool in pure shell script!
We have many talented and driven developers here and this site's goal is to show off our projects to the city and the rest of the world.
Contributions are weclome for backend (Go) and frontend (Polymer/web components) work. Filing issues is the easiest way to contribute.


DANTE'S PEAK A film review by Steve Rhodes Copyright 1997 Steve Rhodes
RATING (0 TO ****): * 1/2
Why are disaster movies so frequently disasters? Probably because they are disasters first and movies second.
That director Roger Donaldson's DANTE'S PEAK would be unsuccessful is obvious from the first scene. Rule number one of horror movies is that the length of time until the monster appears is directly proportional to the quality of the film. (Natural disaster movies are little more than glorified horror flicks.) DANTE'S PEAK starts with people dying under the flying boulders and burning debris of a volcanic eruption.
In the opening, Pierce Brosnan makes his debut as shrill vulcanologist Harry Dalton. In Harry's first words he screams something incomprehensible that sounds like "Get out of here." The bad news is that you will be able to hear the rest of the dialog in the film. ("I've always been better at volcanoes than figuring out people and politics," Harry tells us. "I move around a lot, wherever there's a volcano with an attitude," he explains in another scene.)
If you liked TWISTER, you'll probably find DANTE'S PEAK equally satisfying.  (The team is at its funniest when the volcano erupts. When the team runs to their computers to see the images, the only female nerd, looking out the window, chides them, "Why look at the computer when you can look at the real thing.") Like TWISTER, the only reason for the film to exist are the special effects. Although the special effects by Thomas Kittle are spectacular, the sound effects by David MacMillan are even more impressive. Some of the explosions had me almost jumping out of my seat.
The story happens in the small and isolated town of Dante's Peak. Linda Hamilton plays the town's miniskirted mayor, Rachel Wando. Unlike her usual, harsh macho role, Hamilton gives a tender and vulnerable performance. She is lovelier and more alluring than I have ever seen her. With better acting than Brosnan's, there could have been a believable love story.
The plot is pure formula. Dante's Peak has just been voted by Money Magazine as "the second-best place to live in America for cities under 20,000," but trouble is brewing. Harry arrives and soon warns the town he thinks their long dormant volcano is about to blow. (Key evidence: He finds 2 dead squirrels, and 2 nude campers who got cooked in a natural hot springs.) The city council refuses to warn the town lest a rich developer pull out. Harry's boss comes in and decides that it would be better not to alert the town prematurely since property values might plummet.
After leaving the theater, my wife and I shared our oral reviews with each other as is our tradition. This time it became almost a contest of who could come up with the largest number of ridiculous and predicable scenes. Let me give you some samples.
Shortly after our would-be lovers touch, they are interrupted by the volcano's evidence of imminent eruption. Rachel's young kids drive a car by themselves up a winding mountain road through ash so thick that they cannot see anything at all. When confronted with a long river of fiery lava, Harry drives his car through it but only the tires melt -- the gas tank does not explode. When the roads are full, Harry drives his car through a river almost as deep as his car is tall. Rachel's mother-in-law decides she can ride out the lava flow and does not need to evacuate her home. Finally, I learned one rule not in my chemistry book. If you have to keep your hand in acid, you can protect yourself completely by wrapping a coat around your hand. And the list goes on.
DANTE'S PEAK runs 1:52. It is rated PG-13 for gory and frightening images of disaster's carnage. Several times the filmmaker is gratuitous in his use of violence. In one scene, for example, Harry breaks his arm and the camera moves in for a close-up of the bone sticking out. Some kids under 13 will probably get a kick out of the show, but I would be quite careful since the chance of significant fright is substantial. I found the film so bad that I was laughing frequently. It could easily have been altered slightly into a very funny parody, but as is, I could not recommend it to anyone. For the tremendous special effects and the massive sound, I give it * 1/2.
**** = A must see film. *** = Excellent show. Look for it. ** = Average movie. Kind of enjoyable. * = Poor show. Don't waste your money. 0 = Totally and painfully unbearable picture.
REVIEW WRITTEN ON: February 28, 1997
Opinions expressed are mine and not meant to reflect my employer's.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


MOVE mouse & press LEFT/A: rotate, MIDDLE/S: zoom, RIGHT/D: pan
NOTES:
Just for visualization's purposes: 1) The Sun' radius are using a scale of 10-2 kms 2) The Planets' radius are using a scale of 10-1 kms 3) The radius of Planets' orbits are using a scale of 10-4 kms


I don't just like emoji,
I love emoji!
Here's a table of my most-used emoji:
| # | Emoji | Name |
|---|---|---|
| 1. | 🐞 | Lady Beetle |
| 2. | 🐍 | Snake |
| 3. | 👍 | Thumbs Up Sign |
| 4. | 🎉 | Party Popper |
| 5. | 🤩 | Grinning Face With Star Eyes |
| 6. | 😂 | Face With Tears Of Joy |
| 7. | 🐶 | Dog Face |
| 8. | 🍿 | Popcorn |
| 9. | 😎 | Smiling Face With Sunglasses |
| 10. | ✨ | Sparkles |
| 11. | 💬 | Speech Balloon |
| 12. | 😘 | Face Throwing A Kiss |


The topics discussed in this page are:
The topics discussed in this page are:
Today, the fundamentals of the electricity distribution system are similar to the first AC systems designed by Tesla and Westinghouse. After electricity is generated and moved along the high-voltage transmission system, it comes off the transmission grid at local distribution substations where the voltage is reduced or “stepped down” by special equipment called transformers. This process can take electricity of up to 765,000 volts and step it down to levels under 50,000 volts.[7] The distinction between transmission and distribution lines is not a hard and fast rule, but, generally speaking, distribution lines tend to have voltages below 50,000.
How do transformers change electricity from high voltage to low? A transformer has two cores, each wrapped in copper wiring, with an electromagnetic field passing between them. When entering the transformer, the power travels through a core with many winds of copper wiring surrounding it. As it leaves the transformer, it passes the other core with many fewer winds, resulting in electricity with much less voltage. The concept sounds easy, but high-voltage transformers are a big investment—they each cost millions of dollars and weight hundreds of tons.[8]
Low voltage electricity can then be distributed through cities and neighborhoods on local distribution power lines.[9] Before the electricity enters houses and business, it is usually stepped down in voltage once again on transformers near the customer (such as the pole-mounted transformers pictured below). For some industrial customers like factories, the voltage may still be relatively high as it reaches its destination, usually between ,000 and 13,000 volts. The power that reaches most residential and commercial customers, however, comes in at 120 or 240 volts.[10]
Once the electricity reaches its final destination, it runs through a meter for billing purposes. These meters have traditionally been electromechanical devices that measure the electricity as it passes through, like the one pictured below. Historically, an employee of the distribution company (a so-called meter reader) would come to read how much power had been used during the billing cycle.
Today, meters are frequently more high-tech and can communicate with the distribution company without a meter reader going to the trouble of checking each meter individually. These new technologies are commonly referred to as “smart meters.” Smart meters use advances in information technology to allow the various pieces of the power grid (power generators, distributors and consumers) to communicate more effectively and in real time.
Collectively, these technology-enabled communications between different parts of the grid are referred to as the “smart grid.” As electric utilities convert analog features to digital, the grid is becoming smarter and allowing for new types of communication. For example, the smart grid allows customers with smart meters to change their consumption patterns (if they choose) by reacting to real-time prices in the wholesale power market.[11] It also allows power companies to better detect grid abnormalities or outages. However, replacing the existing infrastructure with a “smarter” one is expensive and can make the grid more susceptible to cyber security threats.[12]
Distribution is essentially the retail end of the electricity business. Currently, distribution makes up roughly 32 percent of the total cost of electricity—out of the 9.9 cents/kilowatt-hour (kWh) that Americans paid for electricity on average in 2012, distribution accounted for about 3.1 cents/kWh.[17]
Early in the electrification of the U.S., state-level public utility regulators were concerned that electricity companies would use their near-monopoly power to exploit consumers. In response, regulators extended the reach of public utility commissions to regulate electric utilities in the same way they had regulated existing industries such as railroads. The same regulatory bodies created in the late 19th and early 20th centuries are still in place today.[18]
Most often, a state Public Utility Commission (PUC) establishes a maximum rate that power companies are allowed to charge their customers based on the cost of providing electricity. PUCs also scrutinize costs incurred by distribution companies under a “prudence” test before the costs can be recovered. Periodically, PUCs review existing rate structures or the underlying costs and make changes to ensure that the utilities remain viable while minimizing sharp rate increases.[19]
Seventeen states and the District of Columbia now allow electricity customers to buy from competitive retail suppliers rather than the standard distribution company. This concept is known as retail competition or retail choice. The power sold by competitive suppliers still flows on the lines owned by the distribution company, but retail competition allows customers the choice to contract with a third-party supplier for power sold on the same infrastructure.[20]
Any power produced by on-site generators can be used by the customer or cogeneration facility. If there is more electricity generated than is used on-site or in the home, that power can travel back through the meter and onto the distribution grid, providing power in those moments for other local customers. Customers feeding electricity back to the grid can present unique challenges for grid operators trying to manage supply and demand efficiently. For example, in cases such as Hawaii’s, unwanted solar energy that utilities are forced to take may add too much energy to an already-taxed system, increasing the risk of voltage spikes.[26]
Since 2000, the utility industry has invested over $275 billion (2012 USD) on distribution networks.[28] Going forward, investment in new distribution infrastructure through the year 2030 is expected to reach as high as $582 billion.[29] This investment is driven in part by the unavoidable need to replace aging equipment and in part by the push for new “smart” equipment. As with investment levels, residential electricity prices are also rising, with rates in New England, the Mid-Atlantic, the Mountain area, the South Atlantic, and the East North Central accounting for the highest jump in rates.[30] In fact, U.S. retail residential prices for the first half of 2014, at 12.3 cents/kWh, increased 3.2 percent from the same time in 2013, the highest year-to-year increase during the first half of the year since 2009.
Currently, 43 states and the District of Columbia have adopted formal net metering policies. While there is some variation, customers are generally reimbursed for the electricity they supply back to the grid at the full retail rate, when utilities could purchase power from local power plants at wholesale prices. But most customers do not supply power to the grid, and this cost shift from net metering customers to others (generally from solar users to non-solar users) has driven discussions on reforming net metering policies nationwide. Finding a fair way to address these issues going forward is essential for promoting long-term equity and reliability in the power grid.
Electricity may be the one industry in which suppliers actively encourage customers to use less of their product, and that is partly due to demand-side management (DSM) policies. DSM policies such as energy efficiency laws encourage or force utilities to sell less electricity, particularly during peak hours when electricity use and electricity prices are highest.[31]
DSM policy also plays a role in the Environmental Protection Agency’s (EPA’s) recently proposed power plant regulations. EPA administrator Gina McCarthy, in her testimony during a Senate hearing on the power plant regulations, said, “What we’re projecting is that consumers will see a lowering of their energy bills, and that’s because we’re getting waste out of the system…it’s the cheapest, most effective way to get these reductions—to get more efficient.”[32]
Critics of DSM point out two fundamental problems: 1) DSM policies start with a false premise—they assume everyone uses too much electricity to begin with, which is impossible to know for each individual household, and 2) DSM policies fail to accomplish their stated goals—as the Institute for Energy Research has previously noted, energy efficiency mandates can have a “rebound effect.” That is, people increase their use of energy-consuming technologies as they become more efficient, which undermines the initial goal of using less energy.[33]
Thanks to the work of innovators like Thomas Edison and George Westinghouse, we have a robust electricity distribution system today, but we must continue to work to make sure our electricity is reliable and affordable for future generations of Americans. That starts with an appreciation of how far we have come and how fortunate we are to have access to the electricity that powers our lives.


Nth-Best Performances
The n-th best performance refers to the fastest n-th fastest performance by a given runner. These lists basically tell you who has the most performances under any given standard (up to the ADR criteria). Only statistically valid performances are included (short, down-hill, or excessively wind-aided marks are not included).
Road
Outdoor Track
Indoor Track


class Datagram
<init>
Datagram(packet: ByteReadPacket, address: <ERROR CLASS>)
address
val address: <ERROR CLASS>
packet
val packet: ByteReadPacket


Chapter 7 Sampling
In this chapter, we kick off the third portion of this book on statistical inference by learning about sampling. The concepts behind sampling form the basis of confidence intervals and hypothesis testing, which we’ll cover in Chapters 8 and 9. We will see that the tools that you learned in the data science portion of this book, in particular data visualization and data wrangling, will also play an important role in the development of your understanding. As mentioned before, the concepts throughout this text all build into a culmination allowing you to “tell the story with data.”
Needed packages
Let’s load all the packages needed for this chapter (this assumes you’ve already installed them). Recall from our discussion in Section 4.4 that loading the tidyverse
package by running library(tidyverse)
loads the following commonly used data science packages all at once:
ggplot2
for data visualizationdplyr
for data wranglingtidyr
for converting data to “tidy” formatreadr
for importing spreadsheet data into R- As well as the more advanced
purrr
,tibble
,stringr
, andforcats
packages
If needed, read Section 1.3 for information on how to install and load R packages.
library(tidyverse)
library(moderndive)
7.1 Sampling bowl activity
Let’s start with a hands-on activity.
7.1.1 What proportion of this bowl’s balls are red?
Take a look at the bowl in Figure 7.1. It has a certain number of red and a certain number of white balls all of equal size. Furthermore, it appears the bowl has been mixed beforehand, as there does not seem to be any coherent pattern to the spatial distribution of the red and white balls.

One way to answer this question would be to perform an exhaustive count: remove each ball individually, count the number of red balls and the number of white balls, and divide the number of red balls by the total number of balls. However, this would be a long and tedious process.
7.1.2 Using the shovel once
Instead of performing an exhaustive count, let’s insert a shovel into the bowl as seen in Figure 7.2. Using the shovel let’s remove 5 \(\times\) 10 = 50 balls, as seen in Figure 7.3.
  While not as exact as doing an exhaustive count of all the balls in the bowl, our guess of 34% took much less time and energy to make.
However, say, we started this activity over from the beginning. In other words, we replace the 50 balls back into the bowl and start over.   Maybe?
What if we repeated this activity several times? Would we obtain exactly 17 red balls each time?  Surely not. Let’s repeat this exercise several times with the help of 33 groups of friends to understand how the value differs with repetition.
7.1.3 Using the shovel 33 times
Each of our 33 groups of friends will do the following:
- Use the shovel to remove 50 balls each.
- Count the number of red balls and thus compute the proportion of the 50 balls that are red.

- Mix the contents of the bowl a little to not let a previous group’s results influence the next group’s.

Recall from Section 2.5 that histograms allow us to visualize the distribution of a numerical variable. In particular, where the center of the values falls and how the values vary. A partially completed histogram of the first 10 out of 33 groups of friends’ results can be seen in Figure 7.6.
Observe the following in the histogram in Figure 7.6:
- At the low end, one group removed 50 balls from the bowl with proportion between 0.20 and 0.25.
- At the high end, another group removed 50 balls from the bowl with proportion between 0.45 and 0.5 red.
- However the most frequently occurring proportions were between 0.30 and 0.35 red, right in the middle of the distribution.
- The shape of this distribution is somewhat bell-shaped.
Let’s construct this same hand-drawn histogram in R using your data visualization skills that you honed in Chapter 2. We saved our 33 groups of friends’ results in a data frame tactile_prop_red
included in the moderndive
package. Run the following to display the first 10 of 33 rows:
tactile_prop_red
# A tibble: 33 x 4
group replicate red_balls prop_red
<chr> <int> <int> <dbl>
1 Ilyas, Yohan 1 21 0.42
2 Morgan, Terrance 2 17 0.34
3 Martin, Thomas 3 21 0.42
4 Clark, Frank 4 21 0.42
5 Riddhi, Karina 5 18 0.36
6 Andrew, Tyler 6 19 0.38
7 Julia 7 19 0.38
8 Rachel, Lauren 8 11 0.22
9 Daniel, Caroline 9 15 0.3
10 Josh, Maeve 10 17 0.34
# … with 23 more rows
Observe for each group
that we have their names, the number of red_balls
they obtained, and the corresponding proportion out of 50 balls that were red named prop_red
. We also have a variable replicate
enumerating each of the 33 groups; we chose this name because each row can be viewed as one instance of a replicated (in other words repeated) activity: using the shovel to remove 50 balls and computing the proportion of those balls that are red.
Let’s visualize the distribution of these 33 proportions using a geom_histogram()
with binwidth = 0.05
in Figure 7.7. This is a computerized and complete version of the partially completed hand-drawn histogram you saw in Figure 7.6.
ggplot(tactile_prop_red, aes(x = prop_red)) +
geom_histogram(binwidth = 0.05, boundary = 0.4, color = "white") +
labs(x = "Proportion of 50 balls that were red",
title = "Distribution of 33 proportions red")
7.1.4 What did we just do?
What we just demonstrated in this activity is the statistical concept of sampling.  However, because the bowl has a very large number of balls, performing an exhaustive count of the red and white balls would be very time-consuming.  Using this sample of 50 balls, we estimated the proportion of the bowl’s balls that are red to be 34%.
Moreover, because we mixed the balls before each use of the shovel, the samples were randomly drawn. Because each sample was drawn at random, the samples were different from each other. Because the samples were different from each other, we obtained the different proportions red observed in Figure 7.7. This is known as the concept of sampling variation.
The purpose of this sampling activity was to develop an understanding of two key concepts relating to sampling:
- Understanding the effect of sampling variation.
- Understanding the effect of sample size on sampling variation.
In Section 7.2, we’ll mimic the hands-on sampling activity we just performed on a computer. This will allow us not only to repeat the sampling exercise much more than 33 times, but it will also allow us to use shovels with different numbers of slots than just 50.
Afterwards, we’ll present you with definitions, terminology, and notation related to sampling in Section 7.3. As in many disciplines, such necessary background knowledge may seem very inaccessible and even confusing at first. However, as with many difficult topics, if you truly understand the underlying concepts and practice, practice, practice, you’ll be able to master them.
To tie the contents of this chapter to the real-word, we’ll present an example of one of the most recognizable uses of sampling: polls. In Section 7.4 we’ll look at a particular case study: a 2013 poll on then U.S. President Obama’s popularity among young Americans, conducted by the Harvard Kennedy School’s Institute of Politics.
To close this chapter we’ll generalize the previous “sampling from a bowl” exercise to other sampling scenarios, present an important theoretical result known as the Central Limit Theorem, and present a few mathematical formulas related to sampling.
Learning check
(LC7.1) Why was it important to mix the bowl before we sampled the balls?
(LC7.2) Why is it that our 33 groups of friends did not all have the same numbers of balls that were red out of 50, and hence different proportions red?
7.2 Virtual sampling
In the previous Section 7.1, we performed a tactile sampling activity by hand. In other words, we used a physical bowl of balls and a physical shovel. We performed this sampling activity by hand first so that we develop a firm understanding of the root ideas behind sampling. In this section, we’ll mimic this tactile sampling activity with a virtual sampling activity using a computer. In other words, we’ll use a virtual analog to the bowl of balls and a virtual analog to the shovel.
7.2.1 Using the virtual shovel once
Let’s start by performing the virtual analog of the tactile sampling exercise we performed in Section 7.1. We first need a virtual analog of the bowl seen in Figure 7.1. To this end, we included a data frame bowl
in the moderndive
package. The rows of bowl
correspond exactly with the contents of the actual bowl.
bowl
# A tibble: 2,400 x 2
ball_ID color
<int> <chr>
1 1 white
2 2 white
3 3 white
4 4 red
5 5 white
6 6 white
7 7 red
8 8 white
9 9 red
10 10 white
# … with 2,390 more rows
Observe that bowl
has 2400 rows, telling us that the bowl contains 2400 equally-sized balls. The first variable ball_ID
is used as an identification variable as discussed in Subsection 1.4.4; none of the balls in the actual bowl are marked with numbers. The second variable color
indicates whether a particular virtual ball is red or white. View the contents of the bowl in RStudio’s data viewer and scroll through the contents to convince yourself that bowl
is indeed a virtual analog of the actual bowl in Figure 7.1.
Now that we have a virtual analog of our bowl, we now need a virtual analog to the shovel seen in Figure 7.2 to generate virtual samples of 50 balls. We’re going to use the rep_sample_n()
function included in the moderndive
package.  The ball_ID
variable identifies which of the 2400 balls from bowl
are included in our sample of 50 balls while color
denotes its color. However what does the replicate
variable indicate? In virtual_shovel
’s case, replicate
is equal to 1 for all 50 rows. This is telling us that these 50 rows correspond to the first repeated/replicated use of the shovel, in our case our first sample. We’ll see in what follows when we “virtually” take 33 samples, replicate
will take values between 1 and 33.
 First, for each of our 50 sampled balls, let’s identify if it is red or not using a test for equality using ==
. Let’s create a new Boolean variable is_red
using the mutate()
function from Section 3.5:
virtual_shovel %>%
mutate(is_red = (color == "red"))
# A tibble: 50 x 4
# Groups: replicate [1]
replicate ball_ID color is_red
<int> <int> <chr> <lgl>
1 1 1970 white FALSE
2 1 842 red TRUE
3 1 2287 white FALSE
4 1 599 white FALSE
5 1 108 white FALSE
6 1 846 red TRUE
7 1 390 red TRUE
8 1 344 white FALSE
9 1 910 white FALSE
10 1 1485 white FALSE
# … with 40 more rows
Observe that for every row where color == "red"
, the Boolean TRUE
is returned and for every row where color
is not equal to "red"
, the Boolean FALSE
is returned.
Second, let’s compute the number of balls out of 50 that are red using the summarize()
function. Recall from Section 3.3 that summarize()
takes a data frame with many rows and returns a data frame with a single row containing summary statistics, like the mean()
or median()
. In this case, we use the sum()
:
virtual_shovel %>%
mutate(is_red = (color == "red")) %>%
summarize(num_red = sum(is_red))
# A tibble: 1 x 2
replicate num_red
<int> <int>
1 1 12
Why does this work? Because R treats TRUE
like the number 1
and FALSE
like the number 0
. So summing the number of TRUE
’s and FALSE
’s is equivalent to summing 1
’s and 0
’s. In the end, this operation counts the number of balls where color
is red
. In our case, 12 of the 50 balls were red. However, you might’ve gotten a different number red because of the randomness of the virtual sampling.
 Let’s make this code a little more compact and succinct by combining the first mutate()
and the summarize()
as follows:
virtual_shovel %>%
summarize(num_red = sum(color == "red")) %>%
mutate(prop_red = num_red / 50)
# A tibble: 1 x 3
replicate num_red prop_red
<int> <int> <dbl>
1 1 12 0.24
Great! 34% of virtual_shovel
’s 50 balls were red!  But remember from our earlier tactile sampling activity that if we repeat this sampling, we will not necessarily obtain the same value of 34% again. There will likely be some variation. In fact, our 33 groups of friends computed 33 such proportions whose distribution we visualized in Figure 7.6. We saw that these estimates varied. Let’s now perform the virtual analog of having 33 groups of students use the sampling shovel!
7.2.2 Using the virtual shovel 33 times
Recall that in our tactile sampling exercise in Section 7.1 we had 33 groups of students each use the shovel, yielding 33 samples of size 50 balls. We then used these 33 samples to compute 33 proportions. In other words we repeated/replicated using the shovel 33 times. We can perform this repeated/replicated sampling virtually by once again using our virtual shovel function rep_sample_n()
, but by adding the reps = 33
argument. This is telling R that we want to repeat the sampling 33 times.
We’ll save these results in a data frame called virtual_samples
. While we provide a preview of the first 10 rows of virtual_samples
in what follows, we highly suggest you scroll through its contents using RStudio’s spreadsheet viewer by running View(virtual_samples)
.
virtual_samples <- bowl %>%
rep_sample_n(size = 50, reps = 33)
virtual_samples
# A tibble: 1,650 x 3
# Groups: replicate [33]
replicate ball_ID color
<int> <int> <chr>
1 1 875 white
2 1 1851 red
3 1 1548 red
4 1 1975 white
5 1 835 white
6 1 16 white
7 1 327 white
8 1 1803 red
9 1 740 red
10 1 179 red
# … with 1,640 more rows
Observe in the spreadsheet viewer that the first 50 rows of replicate
are equal to 1
while the next 50 rows of replicate
are equal to 2
. This is telling us that the first 50 rows correspond to the first sample of 50 balls while the next 50 rows correspond to the second sample of 50 balls. This pattern continues for all reps = 33
replicates and thus virtual_samples
has 33 \(\times\) 50 = 1650 rows.
Let’s now take virtual_samples
and compute the resulting 33 proportions red. We’ll use the same dplyr
verbs as before, but this time with an additional group_by()
of the replicate
variable. Recall from Section 3.4 that by assigning the grouping variable “meta-data” before we summarize()
, we’ll obtain 33 different proportions red. We display a preview of the first 10 out of 33 rows:
virtual_prop_red <- virtual_samples %>%
group_by(replicate) %>%
summarize(red = sum(color == "red")) %>%
mutate(prop_red = red / 50)
virtual_prop_red
# A tibble: 33 x 3
replicate red prop_red
<int> <int> <dbl>
1 1 23 0.46
2 2 19 0.38
3 3 18 0.36
4 4 19 0.38
5 5 15 0.3
6 6 21 0.42
7 7 21 0.42
8 8 16 0.32
9 9 24 0.48
10 10 14 0.28
# … with 23 more rows
As with our 33 groups of friends’ tactile samples, there is variation in the resulting 33 virtual proportions red. Let’s visualize this variation in a histogram in Figure 7.8. Note that we add binwidth = 0.05
and boundary = 0.4
arguments as well. Setting boundary = 0.4
indicates that we want a binning scheme such that one of the bins’ boundary is at 0.4. Since the binwidth = 0.05
is also set, this will create bins with boundaries at 0.30, 0.35, 0.45, 0.5, etc as well.
ggplot(virtual_prop_red, aes(x = prop_red)) +
geom_histogram(binwidth = 0.05, boundary = 0.4, color = "white") +
labs(x = "Proportion of 50 balls that were red",
title = "Distribution of 33 proportions red")
Observe that we occasionally obtained proportions red that are less than 30%. On the other hand, we occasionally obtained proportions that are greater than 45%. However, the most frequently occurring proportions were between 35% and 40% (for 11 out of 33 samples). Why do we have these differences in proportions red? Because of sampling variation.
Let’s now compare our virtual results with our tactile results from the previous section in Figure 7.9. Observe that both histograms are somewhat similar in their center and variation, although not identical. These slight differences are again due to random sampling variation. Furthermore, observe that both distributions are somewhat bell-shaped.
Learning check
(LC7.3) Why couldn’t we study the effects of sampling variation when we used the virtual shovel only once? Why did we need to take more than one virtual sample (in our case 33 virtual samples)?
7.2.3 Using the virtual shovel 1000 times
Now say we want to study the effects of sampling variation not for 33 samples, but rather for a very large number of samples, say 1000. We have two choices at this point. We could have our groups of friends manually take 1000 samples of 50 balls and compute the corresponding 1000 proportions. However, this would be a very tedious and time-consuming task. This is where computers excel: automating long and repetitive tasks while performing them very quickly. Thus at this point we will abandon tactile sampling in favor of only virtual sampling. Let’s once again use the rep_sample_n()
function with sample size
set to be 50 once again, but this time with the number of replicates reps = 1000
.  Using the same data wrangling code as earlier, let’s take the data frame virtual_samples
with 1000 \(\times\) 50 = 50,000 and compute the resulting 1000 proportions red.
virtual_prop_red <- virtual_samples %>%
group_by(replicate) %>%
summarize(red = sum(color == "red")) %>%
mutate(prop_red = red / 50)
virtual_prop_red
# A tibble: 1,000 x 3
replicate red prop_red
<int> <int> <dbl>
1 1 18 0.36
2 2 19 0.38
3 3 20 0.4
4 4 15 0.3
5 5 17 0.34
6 6 16 0.32
7 7 23 0.46
8 8 23 0.46
9 9 15 0.3
10 10 18 0.36
# … with 990 more rows
Observe that we now have 1000 replicates of prop_red
, the proportion of 50 balls that are red. Using the same code as earlier, let’s now visualize the distribution of these 1000 replicates of prop_red
in a histogram in Figure 7.10.
ggplot(virtual_prop_red, aes(x = prop_red)) +
geom_histogram(binwidth = 0.05, boundary = 0.4, color = "white") +
labs(x = "Proportion of 50 balls that were red",
title = "Distribution of 1000 proportions red")
Once again, the most frequently occurring proportions red occur between 35% and 40%. Every now and then, we obtain proportions as low as between 20% and 25%, and others as high as between 55% and 60%. These are rare, however. Furthermore, observe that we now have a much more symmetric and smoother bell-shaped distribution. This distribution is, in fact, a Normal distribution. At this point we recommend you read the “Normal distribution” section of Appendix A.2 for a brief discussion on the properties of the Normal distribution.
Learning check
(LC7.4) Why did we not take 1000 “tactile” samples of 50 balls by hand?
(LC7.5) Looking at Figure 7.10, would you say that sampling 50 balls where 30% of them were red is likely or not? What about sampling 50 balls where 10% of them were red?
7.2.4 Using different shovels
Now say instead of just one shovel, you have three choices of shovels to extract a sample of balls with: shovels of size 25, 50, and 100.
If your goal is still to estimate the proportion of the bowl’s balls that are red, which shovel would you choose? In our experience, most people would choose the largest shovel with 100 slots because it would yield the “best” guess of the proportion of the bowl’s balls that are red. Let’s define some criteria for “best” in this subsection.
Using our newly developed tools for virtual sampling, let’s unpack the effect of having different sample sizes! In other words, let’s use rep_sample_n()
with size = 25
, size = 50
, and size = 100
, while keeping the number of repeated/replicated samples at 1000:
- Virtually use the appropriate shovel to generate 1000 samples with
size
balls. - Compute the resulting 1000 replicates of the proportion of the shovel’s balls that are red.
- Visualize the distribution of these 1000 proportions red using a histogram.
Run each of the following code segments individually and then compare the three resulting histograms.
# Segment 1: sample size = 25 ------------------------------
# 1.a) Virtually use shovel 1000 times
virtual_samples_25 <- bowl %>%
rep_sample_n(size = 25, reps = 1000)
# 1.b) Compute resulting 1000 replicates of proportion red
virtual_prop_red_25 <- virtual_samples_25 %>%
group_by(replicate) %>%
summarize(red = sum(color == "red")) %>%
mutate(prop_red = red / 25)
# 1.c) Plot distribution via a histogram
ggplot(virtual_prop_red_25, aes(x = prop_red)) +
geom_histogram(binwidth = 0.05, boundary = 0.4, color = "white") +
labs(x = "Proportion of 25 balls that were red", title = "25")
# Segment 2: sample size = 50 ------------------------------
# 2.a) Virtually use shovel 1000 times
virtual_samples_50 <- bowl %>%
rep_sample_n(size = 50, reps = 1000)
# 2.b) Compute resulting 1000 replicates of proportion red
virtual_prop_red_50 <- virtual_samples_50 %>%
group_by(replicate) %>%
summarize(red = sum(color == "red")) %>%
mutate(prop_red = red / 50)
# 2.c) Plot distribution via a histogram
ggplot(virtual_prop_red_50, aes(x = prop_red)) +
geom_histogram(binwidth = 0.05, boundary = 0.4, color = "white") +
labs(x = "Proportion of 50 balls that were red", title = "50")
# Segment 3: sample size = 100 ------------------------------
# 3.a) Virtually using shovel with 100 slots 1000 times
virtual_samples_100 <- bowl %>%
rep_sample_n(size = 100, reps = 1000)
# 3.b) Compute resulting 1000 replicates of proportion red
virtual_prop_red_100 <- virtual_samples_100 %>%
group_by(replicate) %>%
summarize(red = sum(color == "red")) %>%
mutate(prop_red = red / 100)
# 3.c) Plot distribution via a histogram
ggplot(virtual_prop_red_100, aes(x = prop_red)) +
geom_histogram(binwidth = 0.05, boundary = 0.4, color = "white") +
labs(x = "Proportion of 100 balls that were red", title = "100")
For easy comparison, we present the three resulting histograms in a single row with matching x and y axes in Figure 7.12.
Observe that as the sample size increases, the variation of the 1000 replicates of the proportion of red decreases. In other words, as the sample size increases, there are fewer differences due to sampling variation and the distribution centers more tightly around the same value. Eyeballing Figure 7.12, all three histograms appear to center around roughly 40%.
We can be numerically explicit about the amount of variation in our 3 sets of 1000 values of prop_red
using the standard deviation . A standard deviation is a summary statistic that measures the amount of variation within a numerical variable (see Appendix A.1 for a brief discussion on the properties of the standard deviation). For all three sample sizes, let’s compute the standard deviation of the 1000 proportions red by running the following data wrangling code that uses the sd()
summary function.
# n = 25
virtual_prop_red_25 %>%
summarize(sd = sd(prop_red))
# n = 50
virtual_prop_red_50 %>%
summarize(sd = sd(prop_red))
# n = 100
virtual_prop_red_100 %>%
summarize(sd = sd(prop_red))
Let’s compare these three measures of variation of the distributions in Table 7.1.
| Number of slots in shovel | Standard deviation of proportions red |
|---|---|
| 25 | 0.099 |
| 50 | 0.071 |
| 100 | 0.048 |
As we observed in Figure 7.12, as the sample size increases, the variation decreases. In other words, there is less variation in the 1000 values of the proportion red.
Learning check
(LC7.6) In Figure 7.12, we used shovels to take 1000 samples each, computed the resulting 1000 proportions of the shovel’s balls that were red, and then visualized the distribution of these 1000 proportions in a histogram. We did this for shovels with 25, 50, and 100 slots in them. As the size of the shovels increased, the histograms got narrower. In other words, as the size of the shovels increased from 25 to 50 to 100, did the 1000 proportions
A. Vary less, B. Vary by the same amount, or C. Vary more?
(LC7.7) What summary statistic did we use to quantify how much the 1000 proportions red varied?
A. The inter-quartile range B. The standard deviation C. The range: the largest value minus the smallest
7.3 Sampling framework
In both our tactile and our virtual sampling activities, we used sampling for the purpose of estimation.  We used sampling as a less time consuming approach than to perform an exhaustive count of all the balls. Our virtual sampling activity built up to the results shown in Figure 7.12 and Table 7.1: comparing 1000 proportions red based on samples of size 25, 50, and 100. This was our first attempt at understanding two key concepts relating to sampling for estimation:
- The effect of sampling variation on our estimates.
- The effect of sample size on sampling variation.
Let’s now introduce some terminology and notation as well as statistical definitions related to sampling. Given the number of new words you’ll need to learn, you will likely have to read this section a few times. Keep in mind, however, that all of the concepts underlying these terminology, notation, and definitions tie directly to the concepts underlying our tactile and virtual sampling activities. It will simply take time and practice to master them.
7.3.1 Terminology & notation
Here is a list of terminology and mathematical notation relating to sampling.
First, A (study) population is a collection of individuals or observations about which we are interested in. We mathematically denote the population’s size using upper case \(N\). In our sampling activities, the (study) population is the collection of \(N\) = 2400 identically sized red and white balls contained in the bowl.
Second, a population parameter is a numerical summary quantity about the population that is unknown, but you wish you knew. For example, when this quantity is a mean, the population parameter of interest is the population mean. This is mathematically denoted with the Greek letter \(\mu\) pronounced “mu” (We’ll see a sampling activity involving means in the upcoming Section 8.1). In our earlier sampling from the bowl activity however, since we were interested in the proportion of the bowl’s balls that were red, the population parameter is the population proportion . This is mathematically denoted with the letter \(p\).
Third, a census is an exhaustive enumeration or counting of all \(N\) individuals or observations in the population in order to compute the population parameter’s value exactly. In our sampling activity, this would correspond to counting the number of balls out of \(N\) = 2400 that are red and computing the population proportion \(p\) that are red exactly. When the number \(N\) of individuals or observations in our population is large as was the case with our bowl, a census can be very expensive in terms of time, energy, and money.
Fourth, sampling is the act of collecting a sample from the population when we don’t have the means to perform a census. We mathematically denote the sample’s size using lower case \(n\), as opposed to upper case \(N\) which denotes the population’s size. Typically the sample size \(n\) is much smaller than the population size \(N\). Thus sampling is a much cheaper alternative than performing a census. In our sampling activities, we used shovels with 25, 50, and 100 slots to extract a sample of size \(n\) = 25, \(n\) = 50, and \(n\) = 100.
Fifth, A point estimate (AKA sample statistic) is a summary statistic computed from a sample that estimates an unknown population parameter. In our sampling activities, recall that the unknown population parameter was the population proportion and that this is mathematically denoted with \(p\). Our point estimate is the sample proportion: the proportion of the shovel’s balls that are red.  We mathematically denote the sample proportion using \(\widehat{p}\). The “hat” on top of the \(p\) indicates that it is an estimate of the unknown population proportion \(p\).
Sixth, the idea of representative sampling. A sample is said to be a representative sample if it roughly looks like the population. In other words, are the sample’s characteristics a good representation of the population’s characteristics?
Seventh, the idea of generalizability. We say a sample is generalizable if any results based on the sample can generalize to the population. In other words, does the value of the point estimate generalize to the population? In our sampling activity, can we generalize the sample proportion from our shovels to the entire bowl? Using our mathematical notation, this is akin to asking if \(\widehat{p}\) a “good guess” of \(p\)?
Eighth, we say biased sampling occurs if certain individuals or observations in a population have a higher chance of being included in a sample than others. We say a sampling procedure is unbiased if every observation in a population had an equal chance of being sampled. In our sampling activities, since each equally sized balls had an equal chance of being sampled in our shovels, our samples were unbiased.
Ninth and lastly, the idea of random sampling. We say a sampling procedure is random if we sample randomly from the population in an unbiased fashion. In our sampling activities, this would correspond to sufficiently mixing the bowl before each use of the shovel.
Phew, that’s a lot of new terminology and notation to learn! Let’s put them all together to describe the paradigm of sampling.
In general:
- If the sampling of a sample of size \(n\) is done at random, then
- the sample is unbiased and representative of the population of size \(N\), thus
- any result based on the sample can generalize to the population, thus
- the point estimate is a “good guess” of the unknown population parameter, thus
- instead of performing a census, we can infer about the population using sampling.

Note that last word we wrote in bold: infer. The act of “inferring” means to deduce or conclude (information) from evidence and reasoning. In our sampling activities, we wanted to infer about the proportion of the bowl’s balls that are red. Statistical inference is the “theory, methods, and practice of forming judgments about the parameters of a population and the reliability of statistical relationships, typically on the basis of random sampling” (Wikipedia). In other words, statistical inference is the act of inference via sampling. In the upcoming Chapter 8 on confidence intervals, we’ll introduce the infer
package, which makes statistical inference “tidy” and transparent. It is why this third portion of the book is called “Statistical inference via infer”.
Learning check
(LC7.8) In the case of our bowl activity, what is the population parameter? Do we know its value?
(LC7.9) What would performing a census in our bowl activity correspond to? Why did we not perform a census?
(LC7.10) What purpose do point estimates serve in general? What is the name of the point estimate specific to our bowl activity? What is its mathematical notation?
(LC7.11) How did we ensure that our tactile samples using the shovel were random?
(LC7.12) Why is it important that sampling be done at random?
(LC7.13) What are we inferring about the bowl based on the samples using the shovel?
7.3.2 Statistical definitions
Now for some important statistical definitions related to sampling. As a refresher of our 1000 repeated/replicated virtual samples of size \(n\) = 25, \(n\) = 50, and \(n\) = 100 in Section 7.2, let’s display Figure 7.12 again.
These types of distributions have a special name: sampling distributions; their visualization displays the effect of sampling variation on the distribution of any point estimate, in this case, the sample proportion \(\widehat{p}\). Using these sampling distributions, for a given sample size \(n\), we can make statements about what values we can typically expect.
For example, observe the centers of all three sampling distributions: they are all roughly centered around 0.4 = 40%. Furthermore, observe that while we are somewhat likely to observe sample proportions red of 0.2 = 20% when using the shovel with 25 slots, we will almost never observe a proportion of 20% when using the shovel with 100 slots. Observe also the effect of sample size on the sampling variation. As the sample size \(n\) increases from 25 to 50 to 100, the variation of the sampling distribution decreases and thus the values cluster more and more tightly around the same center of around 40%. We quantified this variation using the standard deviation of our sample proportions in Table 7.1, which we display again:
| Number of slots in shovel | Standard deviation of proportions red |
|---|---|
| 25 | 0.099 |
| 50 | 0.071 |
| 100 | 0.048 |
So as the sample size increases, the standard deviation decreases. This type of standard deviation has another special name: standard error. Standard errors quantify the effect of sampling variation induced on our estimates. In other words, they quantify how much we can expect different proportions of a shovel’s balls that are red to vary from one sample to another sample to another sample, and so on.
Unfortunately, these names confuse many people new to statistical inference. For example, it’s common for people new to statistical inference to call the “sampling distribution” the “sample distribution.” Another additional source of confusion is the name “standard deviation” and “standard error.” Remember that a standard error is merely a kind of standard deviation: the standard deviation of any point estimate from sampling. In other words, all standard errors are standard deviations, but not all standard deviations are necessarily a standard error.
To help reinforce these concepts, let’s re-display Figure 7.12 but using our new terminology, notation, and definitions relating to sampling in Figure 7.14.
Furthermore, let’s re-display Table 7.1 but using our new terminology, notation, and definitions relating to sampling in Table 7.3.
| Sample size (n) | Standard error of \(\widehat{p}\) |
|---|---|
| n = 25 | 0.099 |
| n = 50 | 0.071 |
| n = 100 | 0.048 |
Remember the key message of this last table: that as the sample size \(n\) goes up, the “typical” error of your point estimate will go down (as quantified by the standard error).
Learning check
(LC7.14) What purpose did the sampling distributions serve?
(LC7.15) What does the standard error of the sample proportion \(\widehat{p}\) quantify?
7.3.3 The moral of the story
Let’s recap this section so far. We’ve seen that if a sample is generated at random, then the resulting point estimate is a “good guess” of the true unknown population parameter.
However, what do we mean by our point estimate being a “good guess”? Sometimes we’ll get an estimate that is less than the true value of the population parameter, while at other times we’ll get an estimate that is greater. This is due to sampling variation. However, despite this sampling variation, our estimates will “on average” be correct and thus will be centered at the true value. This is because our sampling was done at random and thus in an unbiased fashion.
In our sampling activities, sometimes our sample proportion \(\widehat{p}\) was less than the true population proportion \(p\), while at other times it was greater. This was due to the sampling variability. However, despite this sampling variation, our sample proportions \(\widehat{p}\) were “on average” correct and thus were centered at the true value of the population proportion \(p\). This is because we mixed our bowl before taking samples and thus the sampling was done at random and thus in an unbiased fashion. This is also known as having an accurate estimate.
What was the value of the population proportion \(p\) of the \(N\) = 2400 balls in the actual bowl that were red? There were 900 red balls, for a proportion red of 900/2400 = 0.375 = 37.5%! How do we know this? Did the authors do an exhaustive count of all the balls? No! They were listed in the contents of the box that the bowl came in! Hence we were able to make the contents of the virtual bowl
match the tactile bowl:
bowl %>%
summarize(sum_red = sum(color == "red"),
sum_not_red = sum(color != "red"))
# A tibble: 1 x 2
sum_red sum_not_red
<int> <int>
1 900 1500
Let’s re-display our sampling distributions from Figures 7.12 and 7.14, but now with a vertical red line marking the true population proportion \(p\) of balls that are red = 37.5% in Figure 7.15. We see that while there is a certain amount of error in the sample proportions \(\widehat{p}\) for all three sampling distributions, on average the \(\widehat{p}\) are centered at the true population proportion red \(p\).
We also saw in this section that as your sample size \(n\) increases, your point estimates will vary less and less and be more and more concentrated around the true population parameter. This variation is quantified by the decreasing standard error. In other words, the typical error of your point estimates will decrease. In our sampling exercise, as the sample size increased, the variation of our sample proportions \(\widehat{p}\) decreased. You can observe this behavior in Figure 7.15. This is also known as having a precise estimate.
So random and unbiased sampling ensures our point estimates are accurate, while on the other hand having a large sample size ensures our point estimates are precise. While the terms “accuracy” and “precision” may sound like they mean the same thing, there is a subtle difference. Accuracy describes how “on target” our estimates are, whereas precision describes how “consistent” our estimates are. Figure 7.16 illustrates the difference.
As this point, you might be asking yourself: “If we already knew the true proportion of the bowl’s balls that are red was 37.5%, then why did do any sampling?” You might also be asking: “Why did we take 1000 repeated samples of size n = 25, 50, and 100? Shouldn’t we be taking only one sample that’s as large as possible?” If you did ask yourself these questions, your suspicion is merited!
The sampling activity involving the bowl is merely an idealized version of how sampling is done in real-life. We performed this exercise only to study and understand:
- The effect of sampling variation.
- The effect of sample size on sampling variation.
This not how sampling is done in real-life. In a real-life scenario, we won’t know what the true value of the population parameter is. Furthermore we wouldn’t take 1000 repeated/replicated samples, but rather a single sample that’s as large as we can afford. In the next section, let’s now study a real-life example of sampling: polls.
Learning check
(LC7.16) The table that follows is a version of Table 7.3 matching sample sizes \(n\) to different standard errors of the sample proportion \(\widehat{p}\), but with the rows randomly re-ordered and the sample sizes removed. Fill in the table by matching the correct sample sizes to the correct standard errors.
| Sample size | Standard error of p-hat |
|---|---|
| n = | 0.099 |
| n = | 0.048 |
| n = | 0.071 |
For the following four learning checks, let the estimate be the sample proportion \(\widehat{p}\): the proportion of a shovel’s balls that were red.
(LC7.17) What is the difference between an accurate estimate and a precise estimate?
(LC7.18) How do we ensure that an estimate is accurate? How do we ensure that an estimate is precise?
(LC7.19) In a real-life situation, we would not take 1000 different samples to infer about a population, but rather only one. Then what was the purpose of our exercises where we took 1000 different samples?
(LC7.20) Figure 7.16 with the targets shows four combinations of “accurate versus precise” estimates. Draw four corresponding sampling distributions of the sample proportion \(\widehat{p}\), like the one in the left-most plot in Figure 7.15.
7.4 Case study: Polls
Let’s now switch gears to a more realistic sampling scenario than our bowl activity: a poll. In practice, pollsters do not take 1000 repeated samples as we did in our previous sampling activities, but rather take only a single sample that’s as large as possible.
On December 4, 2013, National Public Radio in the US reported on a poll of President Obama’s approval rating among young Americans aged 18-29 in an article “Poll: Support For Obama Among Young Americans Eroding”. The poll was conducted by the Harvard University Institute of Politics. A quote from the article:
After voting for him in large numbers in 2008 and 2012, young Americans are souring on President Obama.
According to a new Harvard University Institute of Politics poll, just 41 percent of millennials — adults ages 18-29 — approve of Obama’s job performance, his lowest-ever standing among the group and an 11-point drop from April.
Let’s tie elements of the real-life poll in this new article with our “tactile” and “virtual” bowl activity from Sections 7.1 and 7.2 using the terminology, notations, and definitions we learned in Section 7.3. You see that our sampling activity with the bowl is an idealized version of what pollsters are trying to do in real-life.
First, who is the (Study) Population of \(N\) individuals or observations of interest?
- Bowl: \(N\) = 2400 identically-sized red and white balls
- Obama poll: \(N\) = ? young Americans aged 18-29
Second, what is the population parameter?
- Bowl: The population proportion \(p\) of all the balls in the bowl that are red.
- Obama poll: The population proportion \(p\) of all young Americans who approve of Obama’s job performance.
Third, what would a census look like?

- Obama poll: Locating all \(N\) young Americans and asking them all if they approve of Obama’s job performance. In the case, we don’t even know what the population size \(N\) is!
Fourth, how do you perform sampling to obtain a sample of size \(n\)?
- Bowl: Using a shovel with \(n\) slots.
- Obama poll: One method is to get a list of phone numbers of all young Americans and pick out \(n\) phone numbers. In this poll’s case, the sample size of this poll was \(n\) = 2089 young Americans.
Fifth, what is your point estimate (AKA sample statistic) of the unknown population parameter?

- Obama poll: The sample proportion \(\widehat{p}\) of young Americans in the sample that approve of Obama’s job performance. In this poll’s case, \(\widehat{p}\) = 0.41 = 41%, the quoted percentage in the second paragraph of the article.
Sixth, is the sampling procedure representative?
- Bowl: Are the contents of the shovel representative of the contents of the bowl? Because we mixed the bowl before sampling, we can feel confident that they are.
- Obama poll: Is the sample of \(n\) = 2089 young Americans representative of all young Americans aged 18-29? This depends on whether the sampling was random.
Seventh, are the samples generalizable to the greater population?
 Given that the sample was representative, the answer is yes.
- Obama poll: Is the sample proportion \(\widehat{p}\) = 0.41 of the sample of young Americans who support Obama a “good guess” of the population proportion \(p\) of all young Americans who support Obama? In other words, can we confidently say that roughly 41% of all young Americans approve of Obama? Again, this depends on whether the sampling was random.
Eighth, is the sampling procedure unbiased? In other words, do all observations have an equal chance of being included in the sample?
- Bowl: Since each ball was equally sized and we mixed the bowl before using the shovel, each ball had an equal chance of being included in a sample and hence the sampling was unbiased.
- Obama poll: Did all young Americans have an equal chance at being represented in this poll? Again, this depends on whether the sampling was random.
Ninth and lastly, was the sampling done at random?
- Bowl: As long as you mixed the bowl sufficiently before sampling, your samples would be random.
- Obama poll: Was the sample conducted at random? We can’t answer this question without knowing about the sampling methodology used by the Harvard University Institute of Politics. We’ll discuss this more at the end of this section.
In other words, the Harvard University Institute of Politics poll can be thought of as an instance of using the shovel to sample balls from the bowl. Furthermore, if another polling company conducted a similar poll of young Americans at roughly the same time, they would likely get a different estimate than 41%. This is due to sampling variation.
Let’s now revisit the sampling paradigm from Section 7.3.1:
In general:
- If the sampling of a sample of size \(n\) is done at random, then
- the sample is unbiased and representative of the population of size \(N\), thus
- any result based on the sample can generalize to the population, thus
- the point estimate is a “good guess” of the unknown population parameter, thus
- instead of performing a census, we can infer about the population using sampling.

Specific to the Obama poll::
- If we had a way of contacting a randomly chosen sample of 2089 young Americans and poll their approval of President Obama, then
- these 2089 young Americans would be an unbiased and representative sample of all young Americans, thus
- any results based on this sample of 2089 young Americans can generalize to the entire population of all young Americans, thus
- the reported sample approval rating of 41% of these 2089 young Americans is a good guess of the true approval rating among all young Americans, thus
- instead of performing an expensive census of all young Americans, we can infer about all young Americans using polling.
So as you can see, it was critical for the Harvard University Institute of Politics sample to be truly random in order to infer about all young Americans’ opinions about Obama. Was their sample truly random? It’s hard to answer such questions without knowing about the sampling methodology used. For example, if this poll was conducted using only mobile phone numbers, people without mobile phones would be left out and therefore not represented in the sample. What about if the Harvard University Institute of Politics conducted this poll on an internet news site? Then people who don’t read this internet news site would be left out. Ensuring that our samples were random was easy to do in our sampling bowl exercises, however in a real-life situation like the Obama poll, this is much harder to do.
Learning check
Comment on the representativeness of the following sampling methodologies:
(LC7.21) The Royal Air Force wants to study how resistant all their airplanes are to bullets. They study the bullet holes on all the airplanes on the tarmac after an air battle against the Luftwaffe (German Air Force).
(LC7.22) Imagine it is 1993, a time when almost all households had landlines. You want to know the average number of people in each household in your city. You randomly pick out 500 phone numbers from the phone book and conduct a phone survey.
(LC7.23) You want to know the prevalence of illegal downloading of TV shows among students at a local college. You get the emails of 100 randomly chosen students and ask them “How many times did you download a pirated TV show last week?”
(LC7.24) A local college administrator wants to know the average income of all graduates in the last 10 years. So they get the records of 5 randomly chosen graduates, contact them, and obtain their answers.
7.5 Conclusion
7.5.1 Sampling scenarios
In this chapter, we performed both tactile and virtual sampling exercises to infer about an unknown proportion. We also presented a case study of sampling in real-life: polls. In both cases, we used the sample proportion \(\widehat{p}\) to estimate the population proportion \(p\). However, we are not just limited to scenarios related to proportions. In other words, we can use sampling to estimate other population parameters using other point estimates as well. We present 5 more such scenarios in Table 7.5.
| Scenario | Population parameter | Notation | Point estimate | Notation. |
|---|---|---|---|---|
| 1 | Population proportion | \(p\) | Sample proportion | \(\widehat{p}\) |
| 2 | Population mean | \(\mu\) | Sample mean | \(\overline{x}\) or \(\widehat{\mu}\) |
| 3 | Difference in population proportions | \(p_1 - p_2\) | Difference in sample proportions | \(\widehat{p}_1 - \widehat{p}_2\) |
| 4 | Difference in population means | \(\mu_1 - \mu_2\) | Difference in sample means | \(\overline{x}_1 - \overline{x}_2\) |
| 5 | Population regression slope | \(\beta_1\) | Fitted regression slope | \(b_1\) or \(\widehat{\beta}_1\) |
| 6 | Population regression intercept | \(\beta_0\) | Fitted regression intercept | \(b_0\) or \(\widehat{\beta}_0\) |
In the rest of this book, we’ll cover all the remaining scenarios as follows:
- In Chapter 8, we’ll cover examples of statistical inference for
- Scenario 2: The mean age \(\mu\) of all pennies in circulation in the US.
- Scenario 3: The difference \(p_1 - p_2\) in the proportion of people who yawn when seeing someone else yawn first minus the proportion of people who yawn without seeing someone else yawn first. This is an example of two-sample inference.
- In Chapter 9, we’ll cover an example of statistical inference for
- Scenario 4: The difference \(\mu_1 - \mu_2\) in mean IMDb ratings for action and romance movies. This is another example of two-sample inference.
- In Chapter 10, we’ll cover an example of statistical inference for regression by revisiting the regression models for teaching score as a function of various instructor demographic variables you saw in Chapters 5 and 6. Specifically
- Scenario 5: The intercept \(\beta_0\) of the population regression line.
- Scenario 6: The slope \(\beta_1\) of the population regression line.
7.5.2 Central Limit Theorem
What you visualized in Figure 7.12 and summarized in Table 7.1 was a demonstration of a very famous theorem, or mathematically proven truth, called the Central Limit Theorem. It loosely states that when sample means are based on larger and larger sample sizes, the sampling distribution of these sample means both more and more normally shaped and more and more narrow.
In other words, their sampling distribution increasingly follows a normal distribution and the variation of these sampling distributions gets smaller, as quantified by their standard errors.
Shuyi Chiou, Casey Dunn, and Pathikrit Bhattacharyya created a 3 minute and 38 second video at https://youtu.be/jvoxEYmQHNM explaining this crucial statistical theorem using the average weight of wild bunny rabbits and the average wingspan of dragons as examples. Figure 7.17 shows a preview of this video.
7.5.3 Additional resources
An R script file of all R code used in this chapter is available here.
7.5.4 What’s to come?
Recall in our Obama poll case study in Section 7.4 that based on this particular sample, the Harvard University Institute of Politics’ best guess of the U.S. President Obama’s approval rating among all young Americans was 41%. However, this isn’t the end of the story. If you read the article further, it states:
The online survey of 2,089 adults was conducted from Oct. 30 to Nov. 11, just weeks after the federal government shutdown ended and the problems surrounding the implementation of the Affordable Care Act began to take center stage. The poll’s margin of error was plus or minus 2.1 percentage points.
Note the term margin of error, which here is plus or minus 2.1 percentage points. Most polls won’t produce an estimate that’s perfectly right; there will always be a certain amount of error caused by sampling variation. The margin of error of plus or minus 2.1 percentage points is saying that a typical range of errors for polls of this type is about \(\pm\) 2.1%, in words from about 2.1% too small to about 2.1% too big. We can restate this as interval of [41% - 2.1%, 41% + 2.1%] = [37.9%, 43.1%] (this notation indicates the interval contains all values 37.9% and 43.1% inclusively). We’ll see in the next chapter that such intervals are known as confidence intervals.


Prepay for NHS prescriptions
Prepayment details
Prepayment for: {{name}}
Date of birth: 01 August 1980
Prepayment number: 869 467 589
Started on: 05 April 2017
Ends on: 04 July 2017
We will email you in June to remind you.
Tell us something has changed
You need to tell us if your name or address changes so that you don't get a fine. You can also change the way we contact you.


QTextList Class
The QTextList class provides a decorated list of items in a QTextDocument. More...
| Header: | #include <QTextList> |
| qmake: | QT += gui |
| Inherits: | QTextBlockGroup |
Note: All functions in this class are reentrant.
Public Functions
| void | add(const QTextBlock &block) |
| int | count() const |
| QTextListFormat | format() const |
| QTextBlock | item(int i) const |
| int | itemNumber(const QTextBlock &block) const |
| QString | itemText(const QTextBlock &block) const |
| void | remove(const QTextBlock &block) |
| void | removeItem(int i) |
| void | setFormat(const QTextListFormat &format) |
- 4 public functions inherited from QTextObject
- 32 public functions inherited from QObject
Additional Inherited Members
- 1 property inherited from QObject
- 1 public slot inherited from QObject
- 2 signals inherited from QObject
- 1 public variable inherited from QObject
- 10 static public members inherited from QObject
- 4 protected functions inherited from QTextBlockGroup
- 1 protected function inherited from QTextObject
- 9 protected functions inherited from QObject
- 2 protected variables inherited from QObject
Detailed Description
The QTextList class provides a decorated list of items in a QTextDocument.
A list contains a sequence of text blocks, each of which is marked with a bullet point or other symbol. Multiple levels of lists can be used, and the automatic numbering feature provides support for ordered numeric and alphabetical lists.
Lists are created by using a text cursor to insert an empty list at the current position or by moving existing text into a new list. The QTextCursor::insertList() function inserts an empty block into the document at the cursor position, and makes it the first item in a list.
QTextListFormat listFormat; if (list) { listFormat = list->format(); listFormat.setIndent(listFormat.indent() + 1); } listFormat.setStyle(QTextListFormat::ListDisc); cursor.insertList(listFormat);
The QTextCursor::createList() function takes the contents of the cursor's current block and turns it into the first item of a new list.
The cursor's current list is found with QTextCursor::currentList().
The number of items in a list is given by count(). Each item can be obtained by its index in the list with the item() function. Similarly, the index of a given item can be found with itemNumber(). The text of each item can be found with the itemText() function.
Note that the items in the list may not be adjacent elements in the document. For example, the top-level items in a multi-level list will be separated by the items in lower levels of the list.
List items can be deleted by index with the removeItem() function. remove() deletes the specified item in the list.
The list's format is set with setFormat() and read with format(). The format describes the decoration of the list itself, and not the individual items.
See also QTextBlock, QTextListFormat, and QTextCursor.
Member Function Documentation
void QTextList::add(const QTextBlock &block)
Makes the given block part of the list.
See also remove() and removeItem().
int QTextList::count() const
Returns the number of items in the list.
QTextListFormat QTextList::format() const
Returns the list's format.
See also setFormat().
QTextBlock QTextList::item(int i) const
Returns the i-th text block in the list.
See also count() and itemText().
int QTextList::itemNumber(const QTextBlock &block) const
Returns the index of the list item that corresponds to the given block. Returns -1 if the block was not present in the list.
QString QTextList::itemText(const QTextBlock &block) const
Returns the text of the list item that corresponds to the given block.
void QTextList::remove(const QTextBlock &block)
Removes the given block from the list.
See also add() and removeItem().
void QTextList::removeItem(int i)
Removes the item at item position i from the list. When the last item in the list is removed, the list is automatically deleted by the QTextDocument that owns it.
void QTextList::setFormat(const QTextListFormat &format)
Sets the list's format to format.
See also format().


List of countries by GDP (nominal)
Global World GDP by Nominal
GDP in Africa
GDP in Asia
GDP in Europe
GDP in North America
GDP in South America
GDP in Ocenia
Data source:
World GDP (Wikipedia)


[§551A-6] Rules. The public guardian shall make such rules as may be necessary to carry out its duties. [L 1984, c 223, pt of §1]


Selected items: {{ selected.join(', ') }}
The select-list
component can be used to allow users to select one or more items from a list.
The following can be used to customize and interact with the component:
true
, multiple items can be selected by the user. If false
, only one item can be selected at a time.
The list items should be defined using a ux-select-list-item
component.
The following can be used to configure the component:
selected
array whenever this item is selected.
The sample code for the above example is:


This driver reads files in Arc/Info Generate format. Those files are simple ASCII files that contain points, lines or polygons (one type of geometry per file).


lively
lets live a little!
Here at lively, we have gathered some of the best recommendations for you!
Search
Hiking
Show
Food
Show
Events
Show


LBC: Kew and Cake
Saturday saw me do a ride with the London Brompton club. It’s the first ride I’ve done with them for quite a while to be fair due to various reasons (such as not being in the country!)
The promise of cake made the ride seem like a good prospect and the good weather we’d been having for the last few days made me think that perhaps the ride would be accompanied with good weather. I wasn’t to disappointed on either front!
Tannus Tyres
The only let down for the ride was my Tannus tyres.
I let one of the other Brompton owners give them a go to try and the consensus was that they didn’t offer a decent ride (see blogpost on them soon). They marred what was an otherwise good ride. I managed to get a few pictures prior to passing the London Eye but then didn’t really stop to get any after that. Perhaps I should get on one of Ben’s Friday photo rides.
As we cycled down the Thames, we were treated to a display of the Royal Air Force as they flew down the river in Chinooks for the ANZAC celebrations (I’m assuming RAF! - Could well have been others).
As we reached Battersea Park, David joined us. This is having just led a ride to Southend overnight! Not something I think I’d be capable of at the minute! Though with proposed cadet activities coming up in the future, this might be something that I should work on soon!
We stopped at Fulham Reach for a tea and cake in Harris and Hoole. A decent cake and a reasonable tea, though not the best tea - unfortunately that was claimed by Brompton Junction and they no longer have the cafe :-(
As we headed back, Ben ended up having some trouble with spokes so we sped up a bit to get back to Brompton Junction before it closed. However, I peeled off at Wandsworth and headed back out to Wimbledon.
Overall, it was a nice trip out and the first (and last) trip with the Tannus tyres - I got back and booked them to be removed that week!


usutils module¶
Module containing methods useful for analyzing umbrella sampling calculations that do not rely directly on the EMUS estimator.
-
emus.usutils.
calc_harmonic_psis
(cv_traj, centers, fks, kTs, period=None)[source]¶ Calculates the values of each bias function from a trajectory of points in a single window.
Parameters: - cv_traj : array-like
Trajectory in collective variable space. Can be 1-dimensional (one cv) or 2-dimensional (many cvs). The first dimension is the time index, and (optional) second corresponds to the collective variable.
- centers : array-like
The locations of the centers of each window. The first dimension is the window index, and the (optional) second is the collective variable index.
- fks : 2D array-like or scalar
If array or list, data structure where the first dimension corresponds to the window index and the second corresponds to the collective variable. If scalar, windows are assumed to have that force constant in every dimension.
- kTs : 2D array-like or scalar
1D array with the Boltzmann factor or a single value which will be used in all windows. Default value is the scalar 1.
- period : 1D array-like or float, optional
Period of the collective variable e.g. 360 for an angle. If None, all collective variables are taken to be aperiodic. If scalar, assumed to be period of each collective variable. If 1D iterable with each value a scalar or None, each cv has periodicity of that size.
Returns: - psis : 2D array
The values of the bias functions evaluated each window and timepoint. See datastructures for more information.
-
emus.usutils.
data_from_meta
(filepath, dim, T=1.0, k_B=1.0, nsig=None, period=None)[source]¶ Reads collective variable data from as tabulated by a meta file of the same format used in Grossfield’s implementation of the WHAM algorithm, and calculates the value of the biasing functions.
Parameters: - filepath : string
The path to the meta file.
- dim : int
The number of dimensions of the cv space.
- T : scalar, optional
Temperature of the system if not provided in the meta file.
- k_B : scalar, optional
Boltzmann Constant for the system. Default is in natural units (1.0)
- nsig : scalar or None, optional
Number of standard deviations of the gaussians to include in the neighborlist.If None, does not use neighbor lists.
- period : 1D array-like or float, optional
Variable with the periodicity information of the system. See the Data Structures section of the documentation for a detailed explanation.
Returns: - psis : List of 2D arrays
The values of the bias functions evaluated each window and timepoint. See datastructures for more information.
-
emus.usutils.
fxn_data_from_meta
(filepath)[source]¶ Parses the meta file associated with observable data
Parameters: - filepath : string
The path to the meta file containing the paths of the observable data.
Returns: - fxndata : List of 2D arrays
Three dimensional data structure containing observable information. The first index corresponds to the observable being calculated, the second to the window index, and the third to the time point in the window.
-
emus.usutils.
neighbors_harmonic
(centers, fks, kTs=1.0, period=None, nsig=6)[source]¶ Calculates neighborlist for harmonic windows. Neighbors are chosen such that neighboring umbrellas are no more than nsig standard deviations away on a flat potential.
Parameters: - centers : 2D array-like
The locations of the centers of each window. The first dimension is the window index, and the second is the collective variable index.
- fks : 2D array-like or scalar
If array or list, data structure where the first dimension corresponds to the window index and the second corresponds to the collective variable. If scalar, windows are assumed to have that force constant in every dimension.
- kTs : 2D array-like or scalar
1D array with the Boltzmann factor or a single value which will be used in all windows. Default value is the scalar 1.
- period : 1D array-like or float
Period of the collective variable e.g. 360 for an angle. If None, all collective variables are taken to be aperiodic. If scalar, assumed to be period of each collective variable. If 1D iterable with each value a scalar or None, each cv has periodicity of that size.
- nsig : scalar
Number of standard deviations of the gaussians to include in the neighborlist.
Returns: - nbrs : 2D list
List where element i is a list with the indices of all windows neighboring window i.
-
emus.usutils.
unpack_nbrs
(compd_array, neighbors, L)[source]¶ Unpacks an array of neighborlisted data. Currently, assumes axis 0 is the compressed axis.
Parameters: - compd_array : array-like
The compressed array, calculated using neighborlists
- neighbors : array-like
The list or array of ints, containing the indices of the neighboring windows
- L : int
The total number of windows.
Returns: - expd_array : array-like
The expanded array of data


Wedding
(current)
Profile
Budget
Encumbrances
My Savings Plan
Log Out
Savings Plan for Sarah
Add to Savings
Add
Monthly Encumbrances
Example Line
$1,000
Add Line
Edit Lines
Savings Summary
Income per Month
$1,000
Expenses Per Month
$1,000
Current Savings
$1,000
Total Savings Goal
$1,000
Remaining Savings Needed
$1,000
Recommended Monthly Savings Goal
$1,000
Monthly Savings Goal
$1,000
Projected Future Savings on Plan
$1,000
Bottom Line
$1,000
Edit Values


{% extends "translator/base.html" %}
{% block body %}
Statistics: Go-Lab Repository
Summary
| What? |
How many? |
| Total labs |
{{ total_labs }} |
| Smart Gateway |
{{ len_sg_labs }} ({{ '%.2f' % (100.0*len_sg_labs/total_labs) }}%) |
| App Composer |
{{ len_ac_labs }} ({{ '%.2f' % (100.0*len_ac_labs/total_labs) }}%) |
| App Composer + Smart Gateway |
{{ len_ac_labs + len_sg_labs }} ({{ '%.2f' % (100.0*(len_ac_labs+len_sg_labs)/total_labs) }}%) |
Full list
{% for name, cur_labs in [ ('Smart Gateway', sg_labs), ('App Composer', ac_labs) ] %}
{{ name }}
{% endfor %}
{% endblock %}


What Is MH370??
What do we know about this flight?
The Flight Plan
According to a preliminary report issued by the Malaysian government. The plane was a Boeing 777. It carried 227 passengers and 12 crew members. It was piloted by Captain Zaharie Ahmad Shah and was co-piloted by Fariq Abdul Hamid. There were no technical issues detected before the plane took off.
MH370 was scheduled to take off at Kuala Lumpur International Airport and arrive at Beijing Capital International Airport 5 hours and 45 minutes later.
After takeoff, the flight was going smoothly. The pilots keep contact with air traffic control throughout.
The Disappearance
Click the button to learn about the disappearance


1. Start small and choose the right trail for your fitness level.
Select a hike a little shorter than the distance you can normally walk on a level or paved surface. To estimate the time required to hike the trail, figure a pace of roughly 2-miles per hour. Next, review the elevation changes and add an hour to your estimated hiking time for every 1000 feet of gain. After you’ve been out once or twice, you’ll have a sense for what distance and elevation changes work well for you.
2. Remember to check the weather
Leading up to your hike, and again a few hours before, check the weather. This will give you valuable information on how to dress and what to pack. If the weather is forecast to be awful, it will give you the chance to change plans instead of getting surprised on the trail.
3. Wear the right shoes and socks
Painful feet can ruin a hike. Invest in quality hiking shoes and socks. This doesn’t mean heavy leather boots, there are a lot of “light hikers” available that require little break-in compared to the old hiking boots I started with. Also, don’t skimp on socks and for goodness sake….no cotton! Wool or synthetic socks are the way to go. Also pack blister dressings just in case.
4.Dress for success
Once your feet are taken care of, dressing right is key to comfort on your hike. Skip cotton anything, it gets damp and stays that way leaving you feeling clammy and causing chafing. Instead go for synthetics. To easily adjust for your temperature and the weather, wear layers that you can add or shed as needed. Lastly, pack an extra warm layer beyond what you think you’ll need, preferably something that will block wind too.
5.Pace yourself
When you first get on the trail, you may feel like powering forward like a hero. However, you’ll be a zero by the end of the day if you don’t pace yourself. Instead, pick a pace you can maintain all day. It might feel a little awkward at first, but after a few miles, especially uphill, you’ll be glad you saved your energy.


InputNumber is an input component to provide numerical input.
InputNumber is used with the standard v-model directive. Component always provides a number type although formatting on the input is a string.
Format is defined using the mode property, "decimal" is the default value allowing only integers when there is no other configuration.
Fractions are configured with the minFractionDigits property. Optionally maxFractionDigits can be used to defined a boundary for the maximum digits.
locale option is available to set the localization information such as grouping and decimal symbols where default value is the browser locale. Locales are defined per BCP Language Tag.
Currency formatting is specified by setting the mode option to currency and currency property. In addition currencyDisplay option allows how the currency is displayed, valid values are "symbol" (default) or "code".
Custom texts e.g. units can be placed before or after the input section with the prefix and suffix properties.
Spinner buttons is enabled using the showButtons options and layout is defined with the buttonLayout. Default value is "stacked" whereas "horizontal" and "stacked" are alternatives. Note that even there are no buttons, up and down arrow keys can be used to spin the values with keyboard.
Step factor is 1 by default and can be customized with step option.
Value to be entered can be restricted by configuring the min and max options.
| Name | Type | Default | Description |
|---|---|---|---|
| value | number | null | Value of the component. |
| format | boolean | true | Whether to format the value. |
| showButtons | boolean | false | Displays spinner buttons. |
| buttonLayout | string | stacked | Layout of the buttons, valid values are "stacked" (default), "horizontal" and "vertical". |
| incrementButtonClass | string | null | Style class of the increment button. |
| decrementButtonClass | string | null | Style class of the decrement button. |
| incrementButtonIcon | string | pi pi-chevron-up | Style class of the increment button. |
| decrementButtonIcon | string | pi pi-chevron-down | Style class of the decrement button. |
| locale | string | null | Locale to be used in formatting. |
| localeMatcher | string | best fit | The locale matching algorithm to use. Possible values are "lookup" and "best fit"; the default is "best fit". See Locale Negotation for details. |
| mode | string | decimal | Defines the behavior of the component, valid values are "decimal" and "currency". |
| prefix | string | null | Text to display before the value. |
| suffix | string | decimal | Text to display after the value. |
| currency | string | null | The currency to use in currency formatting. Possible values are the ISO 4217 currency codes, such as "USD" for the US dollar, "EUR" for the euro, or "CNY" for the Chinese RMB. There is no default value; if the style is "currency", the currency property must be provided. |
| currencyDisplay | string | symbol | How to display the currency in currency formatting. Possible values are "symbol" to use a localized currency symbol such as €, ü"code" to use the ISO currency code, "name" to use a localized currency name such as "dollar"; the default is "symbol". |
| useGrouping | boolean | true | Whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators. |
| minFractionDigits | number | null | The minimum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number and percent formatting is 0; the default for currency formatting is the number of minor unit digits provided by the ISO 4217 currency code list (2 if the list doesn't provide that information). |
| maxFractionDigits | number | null | The maximum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number formatting is the larger of minimumFractionDigits and 3; the default for currency formatting is the larger of minimumFractionDigits and the number of minor unit digits provided by the ISO 4217 currency code list (2 if the list doesn't provide that information). |
| min | number | null | Mininum boundary value. |
| max | number | null | Maximum boundary value. |
| step | number | 1 | Step factor to increment/decrement the value. |
| allowEmpty | boolean | true | Determines whether the input field is empty. |
| style | string | null | Inline style of the component. |
| styleClass | string | null | Style class of the component. |
| inputId | string | null | Identifier of the focus input to match a label defined for the component. |
| inputStyle | string | null | Inline style of the input field. |
| inputStyleClass | string | null | Style class of the input field. |
| placeholder | string | null | Advisory information to display on input. |
| size | number | null | Size of the input field. |
| maxlength | number | null | Maximum number of character allows in the input field. |
| tabindex | number | null | Specifies tab order of the element. |
| disabled | boolean | false | When present, it specifies that the element should be disabled. |
| readonly | boolean | false | When present, it specifies that an input field is read-only. |
| title | string | null | Title text of the input text. |
| ariaLabel | string | null | Used to define a string that labels the input element. |
| ariaRequired | boolean | false | Used to indicate that user input is required on an element before a form can be submitted. |
| name | string | null | Name of the input field. |
| autocomplete | string | null | Used to define a string that autocomplete attribute the current element. |
| Name | Parameters | Description |
|---|---|---|
| getFormatter | - | Returns Intl.NumberFormat object. |
| Name | Parameters | Description |
|---|---|---|
| onFocus | event: Browser event | Callback to invoke when input receives focus. |
| onBlur | event: Browser event | Callback to invoke when input loses focus. |
| onInput | event.originalEvent: Browser event event.value: New value |
Callback to invoke when the value is entered. |
Following is the list of structural style classes, for theming classes visit theming page.
| Name | Element |
|---|---|
| p-inputnumber | Container element |
| p-inputnumber-stacked | Container element with stacked buttons. |
| p-inputnumber-horizontal | Container element with horizontal buttons. |
| p-inputnumber-vertical | Container element with vertical buttons. |
| p-inputnumber-input | Input element |
| p-inputnumber-button | Input element |
| p-inputnumber-button-up | Increment button |
| p-inputnumber-button-down | Decrement button |
| p-inputnumber-button-icon | Button icon |
None.


We are a Jewelry Sale store based in lagos, Nigeria. We deal in all kinds of jewelry like necklaces, bracelets, rings(wedding & engagement) e.t.c. We are just one call away, and we are available 24/7.
Get In TouchBest prices guaranteed.
Free shipping on all orders. We are just one call away.
We update dependencies to keep things fresh.
You have to make your websites with love these days!
Hover Over Products to View Prices !!!
We accept requests for custom work! Please contact us and will get you a special piece.
+234<PHONE_NUMBER>
Fill in the form below to send us a message:


Toggle navigation
GALLERY
EVENTS
POTRAITS
PRODUCT
ABOUT US
CONTACT US
Events Gallery
Feel the energy! Live the moment
Prev
|
Next


[In passing, we note that Ψ ≡ AϕR is the covariant toroidal component of A in cylindrical coordinates (R,ϕ,Z). The proof is as follows. Note that the covariant form of A should be expressed in terms of the contravariant basis vector (∇R, ∇ϕ, and ∇Z), i.e.,
|
| (502) |
where A2 is the covariant toroidal component of A. To obtain A2, we take scalar product of Eq. (502) with ∂r∕∂ϕ and use the orthogonality relation (80), which gives
|
| (503) |
In cylindrical coordinates (R,ϕ,Z), the location vector is written as
|
| (504) |
where , , and are unit vectors along ∂r∕∂R, ∂r∕∂Z, and ∂r∕∂ϕ, respectively, i.e.
|
| (505) |
Using this, we obtain
|
| (506) |
Use Eq. (506) in Eq. (503) giving
|
| (507) |
with Aϕ deﬁned by Aϕ = A ⋅. Equation (507) indicates that Ψ = AϕR is the covariant toroidal component of the vector potential.]