The second one is correct (fix spelling, though). “Randomly” is an adverb, which means it must be modifying the adjective “selected”, so no hyphen is needed. If you had written “random-selected sample”, then you’d need the hyphen.
The comma in the first case isn’t grammatically necessary, but I think it makes the sentence flow better.
The hyphen in the second case is definitely unnecessary. It’s kind of a trend these days to hyphenate adverb-adjective pairs, but the construction doesn’t actually require a hyphen. Consider these examples:
happily married couple
viciously brutal attack
dangerously sudden depressurization
Hyphens would just make the construction clumsy-looking and not add anything to the clarity of the sentence. When you want hyphens between two words in an adjectival modifier is when the first word isn’t an adverb, as in needscoffee’s example, or when the phrase might be unclear without the hyphen, as in “little-known invention” or “well-seasoned food”.
Its been many years since I was involved with grammar and that wasn’t primarily English grammar. Besides, this isn’t grammar. It’s style.
“In order to be successful in life a person needs a good education.” is the correct one if you ask me. I see no reason to put a comma there. Punctuation has no purpose of it’s own. It’s there to help the reader and that comma fills no function at all.
“In order to be successful in life” is a conditional clause. If a sentence begins with a conditional clause, you should separate the conditional clause from the rest of the sentence with a comma. If you want further justification, say it aloud; you will almost certainly find that you include a brief pause between “life” and “a”. Such a pause is represented in print by a comma.
You generally don’t need a hyphen between an adverb and an adjective, and you specifically don’t need a hyphen when the adverb ends with “-ly”. A hyphen may be required when the adverb can also be an adjective. An ill-suited individual is not a sick person in a suit, for a slightly silly example; the hyphen makes it clear that “ill” modifies “suited” rather than “individual”.
While both are correct, I prefer the one with the comma. For me, it helps separate the introductory clause from the main clause. There definitely is a trend towards more “open” punctuation with fewer commas and the like, but, in this case, I prefer the comma.
As for the second, the general style convention is not to hyphenate “-ly” ending adverbs. For example, “a well-kept lawn,” but “a nicely shaved beard.” I believe I’ve seen some style guides exempt “well” from hyphenation, too.
Whenever a pause is used in speaking, some punctuation will be needed. A natural pause exists between “In order to be successful in life” and the remainder of the sentence. Since that clause is not a complete sentence, a comma is needed.
This is not always true, especially since some people may pause, and others may not.
Plus there are uses of the comma governed by dependent and independent clauses that don’t necessarily follow how the sentences are said aloud.
“I am going to the store and buying some eggs.”
“I am going to the store, and I’m buying some eggs.”
Some people may pause in the first sentence between “store” and “and.” Some may not pause in the second sentence between “store” and “and.” However, the first is punctuated without a comma, and the second is punctuated with a comma, according to the traditional rules of grammar/style.
Not everyone puts a pause before that “and.” As for the first sentence, it’s grammatically correct if not phrased well. You can come up with any of a number of similar constructions that will fit the bill if you don’t like that one. Commas do not always show pauses. They are also used to show structure. Here’s one site, although I’m sure we can find better ones:
While commas don’t always show pauses, pauses in speech are a good guide to where to put commas. Other than with the serial comma, you do tend to pause slightly (or use other signifying vocal inflections) where a comma will appear. In natural speech, for instance, you do pause before a new clause.
It’s not infallible, but it’s a good general guide.
Like I said, I disagree. When I worked as a copy editor, I saw more than my fair share of comma splices. The splices were logical and in locations where a pause would naturally fall. Like that last sentence, for instance. The way I’m saying it in my head, there is a pause between “natural” and “and.” I could put a dash in there if I really want to emphasize the pause, but the comma would be a splice. The writers I have edited do this all the time. They’ll put commas in dependent clauses and omit commas in independent clauses.
I think you may very well have a good ear for this and naturally “speak” commas in your sentences. (See, right there I paused slightly before “this” and “and,” but no comma belongs there.) Thus, I’m hesitant to say speech pauses are a good way to judge where a comma does and does not belong. And I’m not the only person who thinks so, as cited above.
When I say that sentence aloud, I don’t pause between “logical” and “and”. I might put mild emphasis on “and”, but that may just be me second-guessing myself at this point. This doesn’t constitute evidence either way, of course; it could simply be an artifact of my speech patterns.
I consider pauses useful in guiding comma placement, but I will freely concede that the correspondence isn’t perfect. Also, its usefulness almost certainly varies from one speaker to another.